fix a small bug - ReferenceField() comment give a wrong demo .
This commit is contained in:
parent
b320064418
commit
8f505c2dcc
@ -877,7 +877,7 @@ class ReferenceField(BaseField):
|
|||||||
content = StringField()
|
content = StringField()
|
||||||
foo = ReferenceField('Foo')
|
foo = ReferenceField('Foo')
|
||||||
|
|
||||||
Bar.register_delete_rule(Foo, 'bar', NULLIFY)
|
Bar.register_delete_rule(Foo, 'foo', NULLIFY)
|
||||||
|
|
||||||
.. note ::
|
.. note ::
|
||||||
`reverse_delete_rule` does not trigger pre / post delete signals to be
|
`reverse_delete_rule` does not trigger pre / post delete signals to be
|
||||||
@ -1013,7 +1013,7 @@ class ReferenceField(BaseField):
|
|||||||
class CachedReferenceField(BaseField):
|
class CachedReferenceField(BaseField):
|
||||||
"""
|
"""
|
||||||
A referencefield with cache fields to purpose pseudo-joins
|
A referencefield with cache fields to purpose pseudo-joins
|
||||||
|
|
||||||
.. versionadded:: 0.9
|
.. versionadded:: 0.9
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -1707,17 +1707,17 @@ class SequenceField(BaseField):
|
|||||||
:param collection_name: Name of the counter collection (default 'mongoengine.counters')
|
:param collection_name: Name of the counter collection (default 'mongoengine.counters')
|
||||||
:param sequence_name: Name of the sequence in the collection (default 'ClassName.counter')
|
:param sequence_name: Name of the sequence in the collection (default 'ClassName.counter')
|
||||||
:param value_decorator: Any callable to use as a counter (default int)
|
:param value_decorator: Any callable to use as a counter (default int)
|
||||||
|
|
||||||
Use any callable as `value_decorator` to transform calculated counter into
|
Use any callable as `value_decorator` to transform calculated counter into
|
||||||
any value suitable for your needs, e.g. string or hexadecimal
|
any value suitable for your needs, e.g. string or hexadecimal
|
||||||
representation of the default integer counter value.
|
representation of the default integer counter value.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
In case the counter is defined in the abstract document, it will be
|
In case the counter is defined in the abstract document, it will be
|
||||||
common to all inherited documents and the default sequence name will
|
common to all inherited documents and the default sequence name will
|
||||||
be the class name of the abstract document.
|
be the class name of the abstract document.
|
||||||
|
|
||||||
.. versionadded:: 0.5
|
.. versionadded:: 0.5
|
||||||
.. versionchanged:: 0.8 added `value_decorator`
|
.. versionchanged:: 0.8 added `value_decorator`
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user