mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-28 20:44:01 +03:00
Update application-single-container example
This commit is contained in:
parent
6030950596
commit
273cd7cc84
|
@ -25,7 +25,6 @@ def main(
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
container = Container()
|
container = Container()
|
||||||
container.init_resources()
|
container.init_resources()
|
||||||
container.config.from_ini("config.ini")
|
|
||||||
container.wire(modules=[__name__])
|
container.wire(modules=[__name__])
|
||||||
|
|
||||||
main(*sys.argv[1:])
|
main(*sys.argv[1:])
|
||||||
|
|
|
@ -11,7 +11,7 @@ from . import services
|
||||||
|
|
||||||
class Container(containers.DeclarativeContainer):
|
class Container(containers.DeclarativeContainer):
|
||||||
|
|
||||||
config = providers.Configuration()
|
config = providers.Configuration(ini_files=["config.ini"])
|
||||||
|
|
||||||
logging = providers.Resource(
|
logging = providers.Resource(
|
||||||
logging.config.fileConfig,
|
logging.config.fileConfig,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user