Improve styling of app
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user