Improve styling of app

This commit is contained in:
Peter Stockings
2026-03-09 21:50:53 +11:00
parent ab23bf6a9e
commit de66dc5fd8
9 changed files with 708 additions and 139 deletions

View File

@@ -1,6 +1,6 @@
from flask import Blueprint, render_template, redirect, url_for, flash
from werkzeug.security import generate_password_hash, check_password_hash
from app.models import db, User
from app.models import db, User, Profile
from app.forms import LoginForm, SignupForm
from flask_login import login_user, login_required, logout_user
@@ -11,7 +11,8 @@ def signup():
form = SignupForm()
if form.validate_on_submit():
hashed_password = generate_password_hash(form.password.data)
new_user = User(username=form.username.data, password_hash=hashed_password)
new_profile = Profile()
new_user = User(username=form.username.data, password_hash=hashed_password, profile=new_profile)
db.session.add(new_user)
db.session.commit()
flash("Account created successfully. Please log in.", "success")