Skip to content

Commit f9b4652

Browse files
committed
Update basic factory example and docs
1 parent 98c4ec7 commit f9b4652

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/images/providers/factory.png

592 Bytes
Loading

docs/providers/factory.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Factory providers
22
-----------------
33

4-
``Factory`` provider creates new instance of specified class on every call.
4+
``di.Factory`` provider creates new instance of specified class on every call.
55

66
Nothing could be better than brief example:
77

examples/providers/factory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
"""`Factory` providers example."""
1+
"""`di.Factory` providers example."""
22

3-
from dependency_injector.providers import Factory
3+
import dependency_injector as di
44

55

66
class User(object):
77

88
"""Example class User."""
99

1010
# Factory provider creates new instance of specified class on every call.
11-
users_factory = Factory(User)
11+
users_factory = di.Factory(User)
1212

1313
# Creating several User objects:
1414
user1 = users_factory()

0 commit comments

Comments
 (0)