mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-01-30 19:24:31 +03:00
Update ExternalDependency provider example
This commit is contained in:
parent
444af2ab0e
commit
b866229efb
|
@ -1,4 +1,4 @@
|
|||
"""`ExternalDependency` providers example."""
|
||||
"""`di.ExternalDependency` providers example."""
|
||||
|
||||
import sqlite3
|
||||
import contextlib
|
||||
|
@ -18,6 +18,7 @@ class UserService(object):
|
|||
Database dependency need to be injected via init arg.
|
||||
"""
|
||||
self.database = database
|
||||
self.database.row_factory = sqlite3.dbapi2.Row
|
||||
|
||||
def init_database(self):
|
||||
"""Initialize database, if it has not been initialized yet."""
|
||||
|
|
Loading…
Reference in New Issue
Block a user