From 0493bbbc76457b12dfaaf2a5558a84bc36a1b62a Mon Sep 17 00:00:00 2001 From: Jiequan Date: Sun, 2 Jun 2013 20:46:51 +0800 Subject: [PATCH] Update upgrade.rst Added docs for the new function: clean() --- docs/upgrade.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/upgrade.rst b/docs/upgrade.rst index b5f3304f..c3d31824 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -91,6 +91,13 @@ the case and the data is set only in the ``document._data`` dictionary: :: File "", line 1, in 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 --------------