Skip to content

Instantly share code, notes, and snippets.

@marknagelberg
Created August 20, 2018 04:09
Show Gist options
  • Save marknagelberg/e7d40c9b07c12db67033066e49392bec to your computer and use it in GitHub Desktop.
Save marknagelberg/e7d40c9b07c12db67033066e49392bec to your computer and use it in GitHub Desktop.
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