Skip to content
Snippets Groups Projects
Commit cecc586f authored by Julian Rother's avatar Julian Rother
Browse files

Moved default config into server.py

parent 2468d5a6
No related branches found
No related tags found
No related merge requests found
File moved
......@@ -8,9 +8,15 @@ app = Flask(__name__)
config = app.config
config['DB_SCHEMA'] = 'db_schema.sql'
config['DB_DATA'] = 'db_example.sql'
config['SQLITE_INIT_SCHEMA'] = False
config['DB_ENGINE'] = 'sqlite'
config['SQLITE_DB'] = 'db.sqlite'
config['SQLITE_INIT_SCHEMA'] = True
config['SQLITE_INIT_DATA'] = False
config.from_pyfile('config.py')
config['DEBUG'] = False
if __name__ == '__main__':
config['SQLITE_INIT_DATA'] = True
config['DEBUG'] = True
config.from_pyfile('config.py', silent=True)
if config['DB_ENGINE'] == 'sqlite':
created = not os.path.exists(config['SQLITE_DB'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment