Update bundles example with Dependency provider

This commit is contained in:
Roman Mogylatov 2017-12-21 22:58:13 +02:00
parent 828a04de88
commit 1115e783e0
5 changed files with 5 additions and 24 deletions

View File

@ -1,7 +1,7 @@
"""Photos bundle."""
from core import containers
from core import providers
from dependency_injector import providers
from . import entities
from . import repositories

View File

@ -1,7 +1,7 @@
"""Users bundle."""
from core import containers
from core import providers
from dependency_injector import providers
from . import entities
from . import repositories

View File

@ -2,9 +2,7 @@
import six
from dependency_injector import containers
from core import providers
from dependency_injector import containers, providers
class DeclarativeContainer(containers.DeclarativeContainer):

View File

@ -1,18 +0,0 @@
"""Providers module."""
from dependency_injector import providers
Factory = providers.Factory
Singleton = providers.Singleton
deepcopy = providers.deepcopy
class Dependency(providers.ExternalDependency):
"""Dependency provider."""
def __init__(self, type=object):
"""Initializer."""
super(Dependency, self).__init__(type)

View File

@ -1,6 +1,7 @@
"""Example application - Bundles."""
from core import containers, providers
from core import containers
from dependency_injector import providers
from bundles.users import Users
from bundles.photos import Photos