Update upgrade.rst
Added docs for the new function: clean()
This commit is contained in:
parent
c5ce96c391
commit
0493bbbc76
1 changed files with 7 additions and 0 deletions
|
|
@ -91,6 +91,13 @@ the case and the data is set only in the ``document._data`` dictionary: ::
|
||||||
File "<stdin>", line 1, in <module>
|
File "<stdin>", line 1, in <module>
|
||||||
AttributeError: 'Animal' object has no attribute 'size'
|
AttributeError: 'Animal' object has no attribute 'size'
|
||||||
|
|
||||||
|
The Document class has introduced a reserved function `clean()`, which will be
|
||||||
|
called before saving the document. If your document class happen to have a method
|
||||||
|
with the same name, please try rename it.
|
||||||
|
|
||||||
|
def clean(self):
|
||||||
|
pass
|
||||||
|
|
||||||
ReferenceField
|
ReferenceField
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue