Updated flash commands to allow for differently styled boxes
This commit is contained in:
@@ -31,13 +31,13 @@ def login():
|
||||
# No user found
|
||||
if user is None:
|
||||
error = "No user found with the username " + request.form['username']
|
||||
flash(error)
|
||||
flash(error, 'warning')
|
||||
return redirect("/login")
|
||||
|
||||
# Incorrect Password
|
||||
if sha512(request.form['password'].encode()).hexdigest() != user.password:
|
||||
error = "Incorrect Password"
|
||||
flash(error)
|
||||
flash(error, 'warning')
|
||||
return redirect("/login")
|
||||
|
||||
session['user_id'] = user.id
|
||||
@@ -59,7 +59,7 @@ def signup():
|
||||
# User already exists
|
||||
if database.read(request.form['username']) is not None:
|
||||
error = "User, " + request.form['username'] + " already exists"
|
||||
flash(error)
|
||||
flash(error, 'warning')
|
||||
return redirect("/signup")
|
||||
|
||||
# Signup as Seller or Customer
|
||||
|
||||
Reference in New Issue
Block a user