diff --git a/init_db.py b/init_db.py index f57e56b..aa2e09c 100755 --- a/init_db.py +++ b/init_db.py @@ -3,7 +3,8 @@ from flaskapp import db print('[i] Trying to create databse...') try: - db.create_all() + with app.app_context(): + db.create_all() print('[+] Success you can proceed with deployment!') except: print('[-] Creating db failed :/')