default .db its just a admin account with password password123

This commit is contained in:
Jordan
2026-07-27 13:03:04 +12:00
parent e202e9b68e
commit b332df87d7
4 changed files with 13 additions and 3 deletions
+7 -3
View File
@@ -55,7 +55,7 @@ def handle_submission():
form_password = request.form.get('password') or ''
if not form_username or not form_email or not form_password:
return render_template('signup.html', error="All fields are required"), 400
return render_template('signup.html', error="All fields must be entered to complete registration"), 400
if len(form_password) < 8:
return render_template('signup.html', error="Password must be at least 8 characters"), 400
@@ -63,7 +63,7 @@ def handle_submission():
if User.query.filter_by(username=form_username).first():
return render_template('signup.html', user_taken="Username has already been taken"), 400
if User.query.filter_by(email=form_email).first():
return render_template('signup.html', email_taken="Email has already been used"), 400
return render_template('signup.html', email_taken="Email has already been used before"), 400
hashed_password = generate_password_hash(form_password)
new_user = User(username=form_username, email=form_email, password_hash=hashed_password)
@@ -73,7 +73,7 @@ def handle_submission():
db.session.commit()
except IntegrityError:
db.session.rollback()
return render_template('signup.html', error="Username or email already taken"), 400
return render_template('signup.html', error="Username or email has already taken"), 400
return render_template('signup.html', success_message="Account successfully created")
@@ -161,6 +161,10 @@ def logout():
def signup():
return render_template('signup.html')
@app.route('/pagemaker')
def pagemaker():
return render_template('pagemaker.html')
@app.route('/all_users')
@login_required
def all_users():