A simple flask app with web interface
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
632 B

from flask import Flask
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from config import Config
db = SQLAlchemy()
migrate = Migrate()
def create_app(config_class=Config):
"""
The application instance to be used when initializing the app
:param config_class: (Default value = Config)
:returns: The flask application
"""
app = Flask(__name__)
app.config.from_object(config_class)
db.init_app(app)
migrate.init_app(app, db, render_as_batch=True)
from app.main import bp as bp_main
app.register_blueprint(bp_main)
return app
from app import models