diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2014-11-25 23:46:28 +0100 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2014-11-25 23:46:28 +0100 |
commit | 392db861e585f12038f18f41e467ecfcab9d39b0 (patch) | |
tree | 15caa254c14d986478fdd14904a318688fb91b37 /docs | |
parent | 7b31d60af0ab0678d04d7f50abc28ba7c4ccfcbd (diff) | |
download | factory-boy-392db861e585f12038f18f41e467ecfcab9d39b0.tar factory-boy-392db861e585f12038f18f41e467ecfcab9d39b0.tar.gz |
Fix reference docs (Closes #166, #167).
Use ``obj`` for ``@post_generation``-decorated methods, instead of
``self``: this makes it clearer that the ``obj`` is an instance of the
model, and not of the ``Factory``.
Thanks to @jamescooke & @NiklasMM for spotting the typo.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/reference.rst b/docs/reference.rst index 2516936..43433e0 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -1192,7 +1192,7 @@ For instance, a :class:`PostGeneration` hook is declared as ``post``: model = SomeObject @post_generation - def post(self, create, extracted, **kwargs): + def post(obj, create, extracted, **kwargs): obj.set_origin(create) .. OHAI_VIM** |