Add Github login
This commit is contained in:
11
setup.py
11
setup.py
@@ -6,12 +6,15 @@ if delete_db and os.path.isfile("app/data.sqlite"):
|
||||
os.remove("app/data.sqlite")
|
||||
|
||||
if not os.path.isfile("app/data.sqlite"):
|
||||
from app import models
|
||||
from app.models import *
|
||||
|
||||
print("Creating database tables...")
|
||||
models.db.create_all()
|
||||
|
||||
db.create_all()
|
||||
print("Filling database...")
|
||||
models.db.session.commit()
|
||||
|
||||
ruben = User("rubenwardy")
|
||||
ruben.github_username = "rubenwardy"
|
||||
db.session.add(ruben)
|
||||
db.session.commit()
|
||||
else:
|
||||
print("Database already exists")
|
||||
|
||||
Reference in New Issue
Block a user