Add files via upload

This commit is contained in:
Sleepingpirates
2020-06-17 21:23:10 -04:00
committed by GitHub
parent 3cb5594662
commit a9bdbf800c
20 changed files with 1372 additions and 0 deletions

14
app/setup.py Normal file
View File

@@ -0,0 +1,14 @@
from app import db, bcrypt
from app.models import User
DEFAULT_USER = "admin"
DEFAULT_PASS = "admin"
db.create_all()
try:
hashed_password = bcrypt.generate_password_hash(DEFAULT_PASS).decode('utf-8')
user = User(username=DEFAULT_USER, password=hashed_password)
db.session.add(user)
db.session.commit()
except:
print("Some error in setting up.")