From 0ac7b075f76b3989fe9eb763b73bab827c9deccd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 25 Dec 2009 06:44:37 +0000 Subject: Fix syntax errors found via manuel, and add manuel-style markers to prevent untestable code blocks from being tested. --- docs/narr/models.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/narr/models.rst') 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 -- cgit v1.2.3