Update doc blocks for IoC containers in services example

This commit is contained in:
Roman Mogilatov 2016-05-27 14:57:37 +03:00
parent 05c2c864a7
commit e669270bfb
3 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)