diff --git a/docs/images/providers/factory.png b/docs/images/providers/factory.png index 8b4354fc..1b0dc8a0 100644 Binary files a/docs/images/providers/factory.png and b/docs/images/providers/factory.png differ diff --git a/docs/providers/factory.rst b/docs/providers/factory.rst index dce1b5a7..8d39728c 100644 --- a/docs/providers/factory.rst +++ b/docs/providers/factory.rst @@ -1,7 +1,7 @@ Factory providers ----------------- -``Factory`` provider creates new instance of specified class on every call. +``di.Factory`` provider creates new instance of specified class on every call. Nothing could be better than brief example: diff --git a/examples/providers/factory.py b/examples/providers/factory.py index c654597c..63103b5e 100644 --- a/examples/providers/factory.py +++ b/examples/providers/factory.py @@ -1,6 +1,6 @@ -"""`Factory` providers example.""" +"""`di.Factory` providers example.""" -from dependency_injector.providers import Factory +import dependency_injector as di class User(object): @@ -8,7 +8,7 @@ class User(object): """Example class User.""" # Factory provider creates new instance of specified class on every call. -users_factory = Factory(User) +users_factory = di.Factory(User) # Creating several User objects: user1 = users_factory()