fix init_db file and run.py

This commit is contained in:
fram3d 2024-01-16 13:28:11 +01:00
parent d9a73a6fd9
commit 52866f9c84
Signed by: fram3d
GPG Key ID: 938920E709EEA32A
2 changed files with 5 additions and 3 deletions

View File

@ -1,9 +1,10 @@
#!/usr/bin/env python3
from flaskapp import db
from taskmanager import db, app
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 :/')

3
run.py
View File

@ -1,4 +1,5 @@
from flaskapp import app
#!/usr/bin/env python3
from taskmanager import app
if __name__ == '__main__':
app.run(debug=False)