diff --git a/config.py b/config.py.example similarity index 100% rename from config.py rename to config.py.example diff --git a/server.py b/server.py index d1d4aaad609dcc4b0d93c535499f093fa02c76bd..09d51cb769ae1ab832475bc0a8480ff151964857 100755 --- a/server.py +++ b/server.py @@ -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'])