Skip to content
Snippets Groups Projects
Commit f3d49f44 authored by Martin Mareš's avatar Martin Mareš
Browse files

DB: Verbose switch přejmenován na SQLALCHEMY_ECHO

... pak funguje i s flaskovým mezikusem, aniž bychom se museli starat.
parent 2cce1b23
No related branches found
No related tags found
No related merge requests found
SQLALCHEMY_DATABASE_URI = "postgresql:///mo_submit" SQLALCHEMY_DATABASE_URI = "postgresql:///mo_submit"
SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_TRACK_MODIFICATIONS = False
DB_VERBOSE = False SQLALCHEMY_ECHO = False
SECRET_KEY = "FIXME" SECRET_KEY = "FIXME"
......
...@@ -253,7 +253,7 @@ def get_session() -> Session: ...@@ -253,7 +253,7 @@ def get_session() -> Session:
if _session is None: if _session is None:
if _engine is None: if _engine is None:
import config import config
_engine = create_engine(config.SQLALCHEMY_DATABASE_URI, echo=config.DB_VERBOSE) _engine = create_engine(config.SQLALCHEMY_DATABASE_URI, echo=config.SQLALCHEMY_ECHO)
MOSession = sessionmaker(bind=_engine) MOSession = sessionmaker(bind=_engine)
_session = MOSession() _session = MOSession()
return _session return _session
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment