summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authoralex-netquity <alex@netquity.com>2013-09-09 12:52:31 -0400
committeralex-netquity <alex@netquity.com>2013-09-09 12:52:31 -0400
commitca393990b35062c5151bc529622131dc93bbed84 (patch)
tree02278b22da66562be6abf1cf33dd3adfb95a96d5 /docs
parent948d8c4191342210a5e9540c9078b807ff4d6829 (diff)
downloadfactory-boy-ca393990b35062c5151bc529622131dc93bbed84.tar
factory-boy-ca393990b35062c5151bc529622131dc93bbed84.tar.gz
Fix undefined error in profile example
The Django’s Profile example references `UserFactory` before its definition. The fix is to use the fully-qualified path to the class in question.
Diffstat (limited to 'docs')
-rw-r--r--docs/recipes.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/recipes.rst b/docs/recipes.rst
index 529d837..c1f3700 100644
--- a/docs/recipes.rst
+++ b/docs/recipes.rst
@@ -80,7 +80,7 @@ factory_boy allows to define attributes of such profiles dynamically when creati
title = 'Dr'
# We pass in profile=None to prevent UserFactory from creating another profile
# (this disables the RelatedFactory)
- user = factory.SubFactory(UserFactory, profile=None)
+ user = factory.SubFactory('app.factories.UserFactory', profile=None)
class UserFactory(factory.django.DjangoModelFactory):
FACTORY_FOR = auth_models.User