summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xapp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/app.py b/app.py
index ca9a7c8..410ad0d 100755
--- a/app.py
+++ b/app.py
@@ -15,6 +15,9 @@ DATABASE = 'db.sqlite3'
cache = SimpleCache()
def init_db():
+ if not os.path.isfile(DATABASE):
+ init_db()
+
with app.app_context():
db = get_db()
with app.open_resource('schema.sql', mode='r') as f:
@@ -130,7 +133,4 @@ def handle_404(error):
return make_response(jsonify({'error': 'Not found'}), 404)
if __name__ == '__main__':
- if not os.path.isfile(DATABASE):
- init_db()
-
app.run(host='0.0.0.0', debug=True)