From dfdc0d92c3f95e9b6788c14c8fb9facaa4bfbfc9 Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Thu, 8 Nov 2012 16:40:58 +0000 Subject: [PATCH] Updated docs --- docs/guide/defining-documents.rst | 2 +- docs/guide/document-instances.rst | 2 +- docs/upgrade.rst | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/guide/defining-documents.rst b/docs/guide/defining-documents.rst index ea8e05b2..9abea9ba 100644 --- a/docs/guide/defining-documents.rst +++ b/docs/guide/defining-documents.rst @@ -597,7 +597,7 @@ Working with existing data As MongoEngine no longer defaults to needing :attr:`_cls` you can quickly and easily get working with existing data. Just define the document to match the expected schema in your database. If you have wildly varying schemas then -a :class:`~mongoengine.DynamicDocument` might be more appropriate. +a :class:`~mongoengine.DynamicDocument` might be more appropriate. :: # Will work with data in an existing collection named 'cmsPage' class Page(Document): diff --git a/docs/guide/document-instances.rst b/docs/guide/document-instances.rst index b3bf687b..e8e7d63c 100644 --- a/docs/guide/document-instances.rst +++ b/docs/guide/document-instances.rst @@ -64,7 +64,7 @@ document values for example:: .. note:: Cleaning is only called if validation is turned on and when calling -:meth:`~mongoengine.Document.save`. + :meth:`~mongoengine.Document.save`. Cascading Saves --------------- diff --git a/docs/upgrade.rst b/docs/upgrade.rst index 44c69beb..bf48527c 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -14,7 +14,7 @@ Data Model The inheritance model has changed, we no longer need to store an array of :attr:`types` with the model we can just use the classname in :attr:`_cls`. This means that you will have to update your indexes for each of your -inherited classes like so: +inherited classes like so: :: # 1. Declaration of the class class Animal(Document): @@ -49,7 +49,7 @@ Document Definition The default for inheritance has changed - its now off by default and :attr:`_cls` will not be stored automatically with the class. So if you extend your :class:`~mongoengine.Document` or :class:`~mongoengine.EmbeddedDocuments` -you will need to declare :attr:`allow_inheritance` in the meta data like so: +you will need to declare :attr:`allow_inheritance` in the meta data like so: :: class Animal(Document): name = StringField() @@ -67,7 +67,7 @@ They should be replaced with :func:`~mongoengine.Document.ensure_indexes` / SequenceFields -------------- -:class:`~mongoengine.fields.SequenceField`s now inherit from `BaseField` to +:class:`~mongoengine.fields.SequenceField` now inherits from `BaseField` to allow flexible storage of the calculated value. As such MIN and MAX settings are no longer handled.