mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-02-07 07:00:49 +03:00
Updating example
This commit is contained in:
parent
4620ad7f29
commit
e38cecfae0
|
@ -2,6 +2,7 @@
|
|||
|
||||
from objects.providers import Factory
|
||||
from objects.providers import Singleton
|
||||
from objects.providers import Delegate
|
||||
|
||||
from objects.injections import KwArg
|
||||
|
||||
|
@ -53,8 +54,7 @@ class UserService(object):
|
|||
# Users factory and UserService provider:
|
||||
users_service = Singleton(UserService,
|
||||
KwArg('users_factory',
|
||||
Factory(User),
|
||||
delegate=True))
|
||||
Delegate(Factory(User))))
|
||||
|
||||
|
||||
# Creating several User objects:
|
||||
|
|
Loading…
Reference in New Issue
Block a user