mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-22 02:54:52 +00:00
Give config more options
Display pretty name for versions and difficulties Add controls image into about
This commit is contained in:
parent
fd6384ef90
commit
7503f7e5cb
7 changed files with 50 additions and 48 deletions
|
@ -1,5 +1,4 @@
|
|||
import uuid
|
||||
import re
|
||||
import os
|
||||
from PIL import Image
|
||||
|
||||
|
@ -29,9 +28,6 @@ def settings():
|
|||
username = request.form.get("username", "").strip()
|
||||
email = request.form.get("email", "").strip()
|
||||
password = request.form.get("password", "").strip()
|
||||
|
||||
user_regex = re.compile(USER_REGEX)
|
||||
email_regex = re.compile(USER_EMAIL_REGEX)
|
||||
error = []
|
||||
|
||||
user = Users.query.filter_by(username=current_user.username).first()
|
||||
|
@ -78,12 +74,12 @@ def settings():
|
|||
image.close()
|
||||
|
||||
if username:
|
||||
if user_regex.match(username):
|
||||
if USER_REGEX.match(username):
|
||||
user.username = username
|
||||
else:
|
||||
error.append("Username is invalid!")
|
||||
if email:
|
||||
if email_regex.match(email):
|
||||
if USER_EMAIL_REGEX.match(email):
|
||||
user.email = email
|
||||
else:
|
||||
error.append("Email is invalid!")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue