diff --git a/mongoengine/fields.py b/mongoengine/fields.py index b57f93b6..ba505fb5 100644 --- a/mongoengine/fields.py +++ b/mongoengine/fields.py @@ -877,7 +877,7 @@ class ReferenceField(BaseField): content = StringField() foo = ReferenceField('Foo') - Bar.register_delete_rule(Foo, 'bar', NULLIFY) + Bar.register_delete_rule(Foo, 'foo', NULLIFY) .. note :: `reverse_delete_rule` does not trigger pre / post delete signals to be @@ -1013,7 +1013,7 @@ class ReferenceField(BaseField): class CachedReferenceField(BaseField): """ A referencefield with cache fields to purpose pseudo-joins - + .. versionadded:: 0.9 """ @@ -1707,17 +1707,17 @@ class SequenceField(BaseField): :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 value_decorator: Any callable to use as a counter (default int) - + Use any callable as `value_decorator` to transform calculated counter into any value suitable for your needs, e.g. string or hexadecimal representation of the default integer counter value. - + .. note:: - - In case the counter is defined in the abstract document, it will be - common to all inherited documents and the default sequence name will + + In case the counter is defined in the abstract document, it will be + common to all inherited documents and the default sequence name will be the class name of the abstract document. - + .. versionadded:: 0.5 .. versionchanged:: 0.8 added `value_decorator` """