From ca393990b35062c5151bc529622131dc93bbed84 Mon Sep 17 00:00:00 2001 From: alex-netquity Date: Mon, 9 Sep 2013 12:52:31 -0400 Subject: Fix undefined error in profile example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Django’s Profile example references `UserFactory` before its definition. The fix is to use the fully-qualified path to the class in question. --- docs/recipes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/recipes.rst') 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 -- cgit v1.2.3