diff options
author | rubenwardy <rw@rubenwardy.com> | 2019-07-02 00:45:04 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-07-02 00:45:16 +0100 |
commit | b36273a848e6dd1a7971283cb3134b6a1e5e39ee (patch) | |
tree | 54a58e13da0895588f8a0c99a885e1ba16dd5315 /app/views/users/users.py | |
parent | 7b087158d7f6080bd463d50e3a12fb8fb307d460 (diff) | |
download | cheatdb-b36273a848e6dd1a7971283cb3134b6a1e5e39ee.tar.xz |
Add website and donation supportv1.15.0
Diffstat (limited to 'app/views/users/users.py')
-rw-r--r-- | app/views/users/users.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/users/users.py b/app/views/users/users.py index 02def25..040950e 100644 --- a/app/views/users/users.py +++ b/app/views/users/users.py @@ -32,6 +32,8 @@ from app.tasks.phpbbparser import getProfile class UserProfileForm(FlaskForm): display_name = StringField("Display name", [Optional(), Length(2, 20)]) email = StringField("Email", [Optional(), Email()]) + website_url = StringField("Website URL", [Optional(), URL()]) + donate_url = StringField("Donation URL", [Optional(), URL()]) rank = SelectField("Rank", [Optional()], choices=UserRank.choices(), coerce=UserRank.coerce, default=UserRank.NEW_MEMBER) submit = SubmitField("Save") @@ -60,6 +62,8 @@ def user_profile_page(username): # Copy form fields to user_profile fields if user.checkPerm(current_user, Permission.CHANGE_DNAME): user.display_name = form["display_name"].data + user.website_url = form["website_url"].data + user.donate_url = form["donate_url"].data if user.checkPerm(current_user, Permission.CHANGE_RANK): newRank = form["rank"].data @@ -74,7 +78,7 @@ def user_profile_page(username): token = randomString(32) ver = UserEmailVerification() - ver.user = user + ver.user = user ver.token = token ver.email = newEmail db.session.add(ver) |