Update services miniapp example

This commit is contained in:
Roman Mogilatov 2016-06-03 17:35:55 +03:00
parent 88b563269d
commit 98ac4d902e
2 changed files with 10 additions and 10 deletions

View File

@ -99,13 +99,13 @@ defined above:
"""Dependency Injector @inject decorator example."""
import dependency_injector.injections as di
import containers
from dependency_injector.injections import inject
from containers import Services
@di.inject(users_service=containers.Services.users)
@di.inject(auth_service=containers.Services.auth)
@di.inject(photos_service=containers.Services.photos)
@inject(users_service=Services.users)
@inject(auth_service=Services.auth)
@inject(photos_service=Services.photos)
def main(users_service, auth_service, photos_service):
"""Main function."""
user = users_service.get_user('user')

View File

@ -1,12 +1,12 @@
"""Dependency Injector @inject decorator example."""
import dependency_injector.injections as di
import containers
from dependency_injector.injections import inject
from containers import Services
@di.inject(users_service=containers.Services.users)
@di.inject(auth_service=containers.Services.auth)
@di.inject(photos_service=containers.Services.photos)
@inject(users_service=Services.users)
@inject(auth_service=Services.auth)
@inject(photos_service=Services.photos)
def main(users_service, auth_service, photos_service):
"""Main function."""
user = users_service.get_user('user')