mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 01:26:51 +03:00
Fix provider documentation (#440)
Make example more realistic. This would break if you're running flask with multiple threads.
This commit is contained in:
parent
7b70f46601
commit
9ed13a4023
|
@ -10,7 +10,7 @@ class Service:
|
|||
|
||||
class Container(containers.DeclarativeContainer):
|
||||
|
||||
service_provider = providers.Singleton(Service)
|
||||
service_provider = providers.ThreadLocalSingleton(Service)
|
||||
|
||||
|
||||
def index_view():
|
||||
|
|
Loading…
Reference in New Issue
Block a user