Skip to content
Snippets Groups Projects
Commit 306ba16f authored by Josef Olsson's avatar Josef Olsson
Browse files

Fix populate

parent 7bbcb446
No related branches found
No related tags found
1 merge request!91Resolve "Upload pictures"
This commit is part of merge request !91. Comments created here will be created in the context of that merge request.
import random
import app.database.controller as dbc
from app import create_app, db
from app.database.models import City, QuestionType, Role
......@@ -100,6 +99,8 @@ if __name__ == "__main__":
app, _ = create_app("configmodule.DevelopmentConfig")
with app.app_context():
import app.database.controller as dbc # Media needs app_context to work
db.drop_all()
db.create_all()
_add_items()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment