From cecc586fab432b82db6cda64dcc3fb67a73afb39 Mon Sep 17 00:00:00 2001
From: Julian Rother <julianr@fsmpi.rwth-aachen.de>
Date: Fri, 19 Aug 2016 14:15:03 +0200
Subject: [PATCH] Moved default config into server.py

---
 config.py => config.py.example |  0
 server.py                      | 10 ++++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)
 rename config.py => config.py.example (100%)

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 d1d4aaa..09d51cb 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'])
-- 
GitLab