aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 0ba2b5a..9949776 100644
--- a/setup.py
+++ b/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")