mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-14 14:12:17 +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
|
||||
*.swp
|
||||
start_server.sh
|
||||
*.log
|
||||
*.log*
|
||||
|
5
db.py
5
db.py
@ -15,7 +15,10 @@ import os.path
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
engine = create_engine(config.get('base', 'database_uri'), convert_unicode = True, echo = True)
|
||||
if config.get('base', 'debug'):
|
||||
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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user