We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56f8066 commit a58c3c5Copy full SHA for a58c3c5
backend/flaskr/__init__.py
@@ -4,7 +4,7 @@
4
from flask_cors import CORS
5
import random
6
7
-from models import setup_db, Question, Category
+from models import setup_db, Question, Category, db
8
9
QUESTIONS_PER_PAGE = 10
10
@@ -21,6 +21,8 @@ def create_app(test_config=None):
21
"""
22
@TODO: Set up CORS. Allow '*' for origins. Delete the sample route after completing the TODOs
23
24
+ with app.app_context():
25
+ db.create_all()
26
27
28
@TODO: Use the after_request decorator to set Access-Control-Allow
0 commit comments