Created
August 20, 2018 04:09
-
-
Save marknagelberg/e7d40c9b07c12db67033066e49392bec 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
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
from config import config | |
db = SQLAlchemy() | |
def create_app(config_name): | |
app = Flask(__name__) | |
app.config.from_object(config[config_name]) | |
db.init_app(app) | |
from .app import bp | |
app.register_blueprint(bp) | |
return app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment