user gets feedback on registration and login
This commit is contained in:
parent
c923178e56
commit
23d43fc3e1
@ -113,21 +113,27 @@ def register():
|
|||||||
|
|
||||||
except InvalidRequestError:
|
except InvalidRequestError:
|
||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
|
registerform.email.errors.append("Something went wrong!")
|
||||||
flash("Something went wrong!", "danger")
|
flash("Something went wrong!", "danger")
|
||||||
except IntegrityError:
|
except IntegrityError:
|
||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
flash("User already exists!.", "warning")
|
registerform.email.errors.append("User already exists!")
|
||||||
|
flash("User already exists!", "warning")
|
||||||
except DataError:
|
except DataError:
|
||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
|
registerform.email.errors.append("Invalid Entry")
|
||||||
flash("Invalid Entry", "warning")
|
flash("Invalid Entry", "warning")
|
||||||
except InterfaceError:
|
except InterfaceError:
|
||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
|
registerform.email.errors.append("Error connecting to the database")
|
||||||
flash("Error connecting to the database", "danger")
|
flash("Error connecting to the database", "danger")
|
||||||
except DatabaseError:
|
except DatabaseError:
|
||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
|
registerform.email.errors.append("Error connecting to the database")
|
||||||
flash("Error connecting to the database", "danger")
|
flash("Error connecting to the database", "danger")
|
||||||
except BuildError:
|
except BuildError:
|
||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
|
egisterform.email.errors.append("Unknown error occured!")
|
||||||
flash("An error occured !", "danger")
|
flash("An error occured !", "danger")
|
||||||
return render_template("register.html", registerform=registerform)
|
return render_template("register.html", registerform=registerform)
|
||||||
|
|
||||||
@ -151,7 +157,6 @@ def distribusi():
|
|||||||
if os.path.exists(unzipfile):
|
if os.path.exists(unzipfile):
|
||||||
os.remove(os.path.join(userfolder, zipfilename))
|
os.remove(os.path.join(userfolder, zipfilename))
|
||||||
# To Do: Make sure nothing can be executed from the upload folder
|
# To Do: Make sure nothing can be executed from the upload folder
|
||||||
# add the css file
|
|
||||||
cssfile = ""
|
cssfile = ""
|
||||||
for filename in os.listdir(userfolder):
|
for filename in os.listdir(userfolder):
|
||||||
if filename.endswith(".css"):
|
if filename.endswith(".css"):
|
||||||
|
@ -92,6 +92,10 @@ input[type="submit"]:disabled:focus {
|
|||||||
background-color: #2D3039;
|
background-color: #2D3039;
|
||||||
color: #d28cff;
|
color: #d28cff;
|
||||||
}
|
}
|
||||||
|
.error {
|
||||||
|
color: #ff5a5a;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* unvisited link */
|
/* unvisited link */
|
||||||
a:link {
|
a:link {
|
||||||
|
Loading…
Reference in New Issue
Block a user