Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Looking for advice? Join the
Matrix channel for GitLab users in Bielefeld
!
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
7f76e788
Commit
7f76e788
authored
5 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Rename account form.
parent
3187cca1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/auth/forms.py
+1
-1
1 addition, 1 deletion
app/auth/forms.py
app/auth/views.py
+3
-3
3 additions, 3 deletions
app/auth/views.py
with
4 additions
and
4 deletions
app/auth/forms.py
+
1
−
1
View file @
7f76e788
...
@@ -47,7 +47,7 @@ class PasswordResetRequestForm(FlaskForm):
...
@@ -47,7 +47,7 @@ class PasswordResetRequestForm(FlaskForm):
submit
=
SubmitField
(
'
Reset Password
'
)
submit
=
SubmitField
(
'
Reset Password
'
)
class
Change
Profile
Form
(
FlaskForm
):
class
Change
Account
Form
(
FlaskForm
):
email
=
StringField
(
'
Email
'
,
validators
=
[
Optional
(),
Length
(
1
,
64
),
email
=
StringField
(
'
Email
'
,
validators
=
[
Optional
(),
Length
(
1
,
64
),
Email
()])
Email
()])
username
=
StringField
(
'
Username
'
,
validators
=
[
username
=
StringField
(
'
Username
'
,
validators
=
[
...
...
This diff is collapsed.
Click to expand it.
app/auth/views.py
+
3
−
3
View file @
7f76e788
...
@@ -2,7 +2,7 @@ from flask import flash, redirect, render_template, request, url_for
...
@@ -2,7 +2,7 @@ from flask import flash, redirect, render_template, request, url_for
from
flask_login
import
current_user
,
login_required
,
login_user
,
logout_user
from
flask_login
import
current_user
,
login_required
,
login_user
,
logout_user
from
.
import
auth
from
.
import
auth
from
..
import
db
from
..
import
db
from
.forms
import
Change
Profile
Form
,
LoginForm
,
PasswordResetForm
,
PasswordResetRequestForm
,
RegistrationForm
from
.forms
import
Change
Account
Form
,
LoginForm
,
PasswordResetForm
,
PasswordResetRequestForm
,
RegistrationForm
from
..email
import
send_email
from
..email
import
send_email
from
..models
import
User
from
..models
import
User
...
@@ -20,7 +20,7 @@ def login():
...
@@ -20,7 +20,7 @@ def login():
if
next
is
None
or
not
next
.
startswith
(
'
/
'
):
if
next
is
None
or
not
next
.
startswith
(
'
/
'
):
next
=
url_for
(
'
main.index
'
)
next
=
url_for
(
'
main.index
'
)
return
redirect
(
next
)
return
redirect
(
next
)
flash
(
'
Invalid username or password.
'
)
flash
(
'
<span class=
"
red-text
"
>
Invalid username or password.
</span>
'
)
return
render_template
(
'
auth/login.html.j2
'
,
form
=
form
,
title
=
'
Log in
'
)
return
render_template
(
'
auth/login.html.j2
'
,
form
=
form
,
title
=
'
Log in
'
)
...
@@ -128,7 +128,7 @@ def password_reset(token):
...
@@ -128,7 +128,7 @@ def password_reset(token):
@auth.route
(
'
/account
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
@auth.route
(
'
/account
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
@login_required
@login_required
def
account
():
def
account
():
form
=
Change
Profile
Form
()
form
=
Change
Account
Form
()
if
form
.
validate_on_submit
():
if
form
.
validate_on_submit
():
flash
(
'
It is just a test, nothing changed.
'
)
flash
(
'
It is just a test, nothing changed.
'
)
if
form
.
username
.
data
:
if
form
.
username
.
data
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment