Browse Source

adds code to initialize and connect to sqlite3 db

Jose Reyes 5 years ago
parent
commit
f547933091
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      flaskr/__init__.py

+ 3
- 0
flaskr/__init__.py View File

@@ -21,6 +21,9 @@ def create_app(test_config=None):
21 21
     @app.route('/hello')
22 22
     def hello():
23 23
         return 'Hello, World!'
24
+    
25
+    from . import db
26
+    db.init_app(app)
24 27
 
25 28
     return app
26 29