fix: overflow on homepage and hot reloading

This commit is contained in:
Nicholas C 2023-03-09 21:03:59 +11:00
parent b57d5aceb6
commit 8164409017
2 changed files with 4 additions and 3 deletions

View File

@ -7,11 +7,12 @@ from .config import db as db_config
db = SQLAlchemy()
migrate = Migrate()
def create_app():
app = Flask(__name__)
app.config['SECRET_KEY'] = '//'
app.config["SQLALCHEMY_DATABASE_URI"] = db_config.SQL_URI
app.config['TEMPLATES_AUTO_RELOAD'] = True
db.init_app(app)
migrate.init_app(app, db)
@ -25,7 +26,7 @@ def create_app():
@login_manager.user_loader
def load_user(user_id):
return User.query.get(int(user_id))
from . import models
with app.app_context():
db.create_all()

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html class="is-clipped">
<head>
<meta charset="utf-8">