From 392db861e585f12038f18f41e467ecfcab9d39b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Tue, 25 Nov 2014 23:46:28 +0100 Subject: 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. --- docs/reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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** -- cgit v1.2.3