Created
January 27, 2019 02:01
-
-
Save delikat/f34dea70eb89dc5f24674bcc4ead4a26 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# database.py | |
from flask_sqlalchemy import SQLAlchemy | |
db = SQLAlchemy() | |
# models.py | |
from database import db | |
class Request(db.Model): | |
# ... | |
# app.py | |
from flask import Flask | |
from database import db | |
app = Flask(__name__) | |
# do all of your db config | |
db.init_app(app) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment