1
Fork 0
mirror of https://github.com/Steffo99/estus.git synced 2024-11-21 23:24:18 +00:00

Make things work again

This commit is contained in:
Steffo 2024-05-21 02:27:45 +02:00
parent ad72202535
commit 26a5302346
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
4 changed files with 21 additions and 19 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ db.sqlite
db.sqlite-journal db.sqlite-journal
data.db data.db
.idea .idea
.venv

View file

@ -1,4 +1,4 @@
flask flask>=3
flask_sqlalchemy flask_sqlalchemy>=3
sqlalchemy sqlalchemy>=1.4,<=2
bcrypt bcrypt>=4

View file

@ -1024,6 +1024,7 @@ def inject_vars():
if __name__ == "__main__": if __name__ == "__main__":
# Se non esiste il database, crealo e inizializzalo! # Se non esiste il database, crealo e inizializzalo!
if not os.path.isfile("db.sqlite"): if not os.path.isfile("db.sqlite"):
with app.app_context():
db.create_all() db.create_all()
try: try:
# L'utente predefinito è "stagista" "smecds". # L'utente predefinito è "stagista" "smecds".