Update doc blocks for IoC containers in services example
This commit is contained in:
parent
05c2c864a7
commit
e669270bfb
|
@ -9,7 +9,7 @@ from dependency_injector import providers
|
|||
|
||||
|
||||
class Platform(containers.DeclarativeContainer):
|
||||
"""Container of platform service providers."""
|
||||
"""IoC container of platform service providers."""
|
||||
|
||||
database = providers.Singleton(sqlite3.connect, ':memory:')
|
||||
|
||||
|
@ -19,7 +19,7 @@ class Platform(containers.DeclarativeContainer):
|
|||
|
||||
|
||||
class Services(containers.DeclarativeContainer):
|
||||
"""Container of business service providers."""
|
||||
"""IoC container of business service providers."""
|
||||
|
||||
users = providers.Factory(example.services.Users,
|
||||
db=Platform.database)
|
||||
|
|
|
@ -12,7 +12,7 @@ from dependency_injector import providers
|
|||
|
||||
|
||||
class Platform(containers.DeclarativeContainer):
|
||||
"""Container of platform service providers."""
|
||||
"""IoC container of platform service providers."""
|
||||
|
||||
database = providers.Singleton(sqlite3.connect) \
|
||||
.add_args(':memory:')
|
||||
|
@ -23,7 +23,7 @@ class Platform(containers.DeclarativeContainer):
|
|||
|
||||
|
||||
class Services(containers.DeclarativeContainer):
|
||||
"""Container of business service providers."""
|
||||
"""IoC container of business service providers."""
|
||||
|
||||
users = providers.Factory(example.services.Users) \
|
||||
.add_kwargs(db=Platform.database)
|
||||
|
|
|
@ -12,7 +12,7 @@ from dependency_injector import providers
|
|||
|
||||
|
||||
class Platform(containers.DeclarativeContainer):
|
||||
"""Container of platform service providers."""
|
||||
"""IoC container of platform service providers."""
|
||||
|
||||
database = providers.Singleton(sqlite3.connect)
|
||||
database.add_args(':memory:')
|
||||
|
@ -23,7 +23,7 @@ class Platform(containers.DeclarativeContainer):
|
|||
|
||||
|
||||
class Services(containers.DeclarativeContainer):
|
||||
"""Container of business service providers."""
|
||||
"""IoC container of business service providers."""
|
||||
|
||||
users = providers.Factory(example.services.Users)
|
||||
users.add_kwargs(db=Platform.database)
|
||||
|
|
Loading…
Reference in New Issue