summaryrefslogtreecommitdiff
path: root/docs/narr/models.rst
diff options
context:
space:
mode:
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