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.
19 lines
431 B
19 lines
431 B
from flask import Flask
|
|
from flask_sqlalchemy import SQLAlchemy
|
|
from flask_migrate import Migrate
|
|
|
|
db = SQLAlchemy()
|
|
|
|
|
|
def create_app():
|
|
app = Flask(__name__, template_folder='templates', static_folder='static', static_url_path='/')
|
|
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///./test.db'
|
|
|
|
db.init_app(app)
|
|
|
|
from routes import register_routes
|
|
register_routes(app, db)
|
|
Migrate(app, db)
|
|
return app
|
|
|