Fix provider documentation (#440)

Make example more realistic.  This would break if you're running flask with multiple threads.
This commit is contained in:
RK 2021-03-30 20:58:39 +01:00 committed by Roman Mogylatov
parent 7b70f46601
commit 9ed13a4023

View File

@ -10,7 +10,7 @@ class Service:
class Container(containers.DeclarativeContainer):
service_provider = providers.Singleton(Service)
service_provider = providers.ThreadLocalSingleton(Service)
def index_view():