summaryrefslogtreecommitdiff
path: root/docs/reference.rst
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-06-09 18:05:20 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-06-09 18:05:20 +0200
commit639e5cd1c6baf1cb19d9134545e29fbb5ba16d99 (patch)
treeac1f7e194021f7e2e912af3f04ba1706f61c9ab3 /docs/reference.rst
parent9bfc44dba97709aa8731e87b17fb2aed29263057 (diff)
downloadfactory-boy-639e5cd1c6baf1cb19d9134545e29fbb5ba16d99.tar
factory-boy-639e5cd1c6baf1cb19d9134545e29fbb5ba16d99.tar.gz
Move DjangoModelFactory / MogoFactory to their own modules.
Diffstat (limited to 'docs/reference.rst')
-rw-r--r--docs/reference.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/reference.rst b/docs/reference.rst
index ad921fa..377feb1 100644
--- a/docs/reference.rst
+++ b/docs/reference.rst
@@ -606,7 +606,9 @@ The :class:`SubFactory` attribute should be called with:
factory
-.. note:: When passing an actual :class:`~factory.Factory` for the
+.. note::
+
+ When passing an actual :class:`~factory.Factory` for the
:attr:`~factory.SubFactory.factory` argument, make sure to pass
the class and not instance (i.e no ``()`` after the class):
@@ -1070,7 +1072,9 @@ RelatedFactory
keyword:
-.. note:: When passing an actual :class:`~factory.Factory` for the
+.. note::
+
+ When passing an actual :class:`~factory.Factory` for the
:attr:`~factory.RelatedFactory.factory` argument, make sure to pass
the class and not instance (i.e no ``()`` after the class):
@@ -1266,7 +1270,7 @@ factory during instantiation.
.. code-block:: python
- class UserFactory(factory.DjangoModelFactory):
+ class UserFactory(factory.django.DjangoModelFactory):
FACTORY_FOR = User
username = 'user'
@@ -1357,12 +1361,12 @@ Lightweight factory declaration
UserFactory = make_factory(models.User,
login='john',
email=factory.LazyAttribute(lambda u: '%s@example.com' % u.login),
- FACTORY_CLASS=factory.DjangoModelFactory,
+ FACTORY_CLASS=factory.django.DjangoModelFactory,
)
# This is equivalent to:
- class UserFactory(factory.DjangoModelFactory):
+ class UserFactory(factory.django.DjangoModelFactory):
FACTORY_FOR = models.User
login = 'john'