From bbd3a6961ef5c731487f9e1a8dd2043f04639ffe Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Mon, 18 Jul 2011 08:35:29 +0100 Subject: [PATCH] Fixed typo in tutorial [closes #235] Thanks @mulka --- docs/tutorial.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 63f8fe9b..6ce8d102 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -22,7 +22,7 @@ function. The only argument we need to provide is the name of the MongoDB database to use:: from mongoengine import * - + connect('tumblelog') For more information about connecting to MongoDB see :ref:`guide-connecting`. @@ -112,7 +112,7 @@ link table, we can just store a list of tags in each post. So, for both efficiency and simplicity's sake, we'll store the tags as strings directly within the post, rather than storing references to tags in a separate collection. Especially as tags are generally very short (often even shorter -than a document's id), this denormalisation won't impact very strongly on the +than a document's id), this denormalisation won't impact very strongly on the size of our database. So let's take a look that the code our modified :class:`Post` class:: @@ -265,5 +265,5 @@ the first matched by the query you provide. Aggregation functions may also be used on :class:`~mongoengine.queryset.QuerySet` objects:: num_posts = Post.objects(tags='mongodb').count() - print 'Found % posts with tag "mongodb"' % num_posts - + print 'Found %d posts with tag "mongodb"' % num_posts +