Updated docs
This commit is contained in:
parent
6ecdc7b59d
commit
69251e5000
@ -533,10 +533,15 @@ convenient and efficient retrieval of related documents::
|
|||||||
class Page(Document):
|
class Page(Document):
|
||||||
title = StringField(max_length=200, required=True)
|
title = StringField(max_length=200, required=True)
|
||||||
|
|
||||||
|
meta = {'allow_inheritance': True}
|
||||||
|
|
||||||
# Also stored in the collection named 'page'
|
# Also stored in the collection named 'page'
|
||||||
class DatedPage(Page):
|
class DatedPage(Page):
|
||||||
date = DateTimeField()
|
date = DateTimeField()
|
||||||
|
|
||||||
|
.. note:: From 0.7 onwards you must declare `allow_inheritance` in the document
|
||||||
|
meta.
|
||||||
|
|
||||||
Working with existing data
|
Working with existing data
|
||||||
--------------------------
|
--------------------------
|
||||||
To enable correct retrieval of documents involved in this kind of heirarchy,
|
To enable correct retrieval of documents involved in this kind of heirarchy,
|
||||||
|
@ -15,6 +15,9 @@ Document._get_subclasses - Is no longer used and the class method has been remov
|
|||||||
|
|
||||||
Document.objects.with_id - now raises an InvalidQueryError if used with a filter.
|
Document.objects.with_id - now raises an InvalidQueryError if used with a filter.
|
||||||
|
|
||||||
|
FutureWarning - A future warning has been added to all inherited classes that
|
||||||
|
don't define `allow_inheritance` in their meta.
|
||||||
|
|
||||||
0.4 to 0.5
|
0.4 to 0.5
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user