summaryrefslogtreecommitdiff
path: root/docs/narr/models.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-12-25 06:44:37 +0000
committerChris McDonough <chrism@agendaless.com>2009-12-25 06:44:37 +0000
commit0ac7b075f76b3989fe9eb763b73bab827c9deccd (patch)
tree50c8d7d38837cb468af45ee90e34efec21bf3e73 /docs/narr/models.rst
parenta0169ff21b5cd7446bf0289bffdb52de8dc61290 (diff)
downloadpyramid-0ac7b075f76b3989fe9eb763b73bab827c9deccd.tar.gz
pyramid-0ac7b075f76b3989fe9eb763b73bab827c9deccd.tar.bz2
pyramid-0ac7b075f76b3989fe9eb763b73bab827c9deccd.zip
Fix syntax errors found via manuel, and add manuel-style markers to prevent
untestable code blocks from being tested.
Diffstat (limited to 'docs/narr/models.rst')
-rw-r--r--docs/narr/models.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/narr/models.rst b/docs/narr/models.rst
index 5002101d5..fdd8af9bc 100644
--- a/docs/narr/models.rst
+++ b/docs/narr/models.rst
@@ -97,8 +97,8 @@ interface (as opposed to its class). To do so, use the
self.author = author
self.created = datetime.datetime.now()
- entry = BlogEntry()
- directlyProvides(IBlogEntry, entry)
+ entry = BlogEntry('title', 'body', 'author')
+ directlyProvides(entry, IBlogEntry)
If a model object already has instance-level interface declarations
that you don't want to disturb, use the
@@ -124,9 +124,9 @@ that you don't want to disturb, use the
self.author = author
self.created = datetime.datetime.now()
- entry = BlogEntry()
- directlyProvides(IBlogEntry1, entry)
- alsoProvides(IBlogEntry2, entry)
+ entry = BlogEntry('title', 'body', 'author')
+ directlyProvides(entry, IBlogEntry1)
+ alsoProvides(entry, IBlogEntry2)
See the :ref:`views_chapter` for more information about why providing
models with an interface can be an interesting thing to do with regard