pluto/handler/__init__.py

21 lines
453 B
Python

from flask import Flask
from flask_sqlalchemy import SQLAlchemy
# init SQLAlchemy so we can use it later in our models
db = SQLAlchemy()
def create_app():
app = Flask(__name__)
app.config["SECRET_KEY"] = "4c7c2f455ffa53edf78d2b2e9c3f24f6f9340975"
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///db.sqlite"
db.init_app(app)
from .main import main as main_blueprint
app.register_blueprint(main_blueprint)
return app