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
     @app.route('/hello')
21
     @app.route('/hello')
22
     def hello():
22
     def hello():
23
         return 'Hello, World!'
23
         return 'Hello, World!'
24
+    
25
+    from . import db
26
+    db.init_app(app)
24
 
27
 
25
     return app
28
     return app
26
 
29