mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-07-04 20:33:13 +03:00
Fix provider documentation
Make example more realistic. This would break if you're running flask with multiple threads.
This commit is contained in:
parent
d04596be73
commit
fe2719bc69
|
@ -10,7 +10,7 @@ class Service:
|
||||||
|
|
||||||
class Container(containers.DeclarativeContainer):
|
class Container(containers.DeclarativeContainer):
|
||||||
|
|
||||||
service_provider = providers.Singleton(Service)
|
service_provider = providers.ThreadLocalSingleton(Service)
|
||||||
|
|
||||||
|
|
||||||
def index_view():
|
def index_view():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user