mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-14 22:22:18 +00:00
debug mode only for db echo on cli
This commit is contained in:
parent
74dbeca76b
commit
f4c861635d
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
*.swp
|
*.swp
|
||||||
start_server.sh
|
start_server.sh
|
||||||
*.log
|
*.log*
|
||||||
|
3
db.py
3
db.py
@ -15,7 +15,10 @@ import os.path
|
|||||||
|
|
||||||
Base = declarative_base()
|
Base = declarative_base()
|
||||||
|
|
||||||
|
if config.get('base', 'debug'):
|
||||||
engine = create_engine(config.get('base', 'database_uri'), convert_unicode = True, echo = True)
|
engine = create_engine(config.get('base', 'database_uri'), convert_unicode = True, echo = True)
|
||||||
|
else:
|
||||||
|
engine = create_engine(config.get('base', 'database_uri'), convert_unicode = True)
|
||||||
|
|
||||||
session = scoped_session(sessionmaker(autoflush = False, bind = engine))
|
session = scoped_session(sessionmaker(autoflush = False, bind = engine))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user