summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2014-11-25 23:46:28 +0100
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2014-11-25 23:46:28 +0100
commit392db861e585f12038f18f41e467ecfcab9d39b0 (patch)
tree15caa254c14d986478fdd14904a318688fb91b37
parent7b31d60af0ab0678d04d7f50abc28ba7c4ccfcbd (diff)
downloadfactory-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.
-rw-r--r--docs/reference.rst2
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**