Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Merge requests
!86
Registrace
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Registrace
mj/registrace
into
devel
Overview
49
Commits
38
Changes
1
Merged
Martin Mareš
requested to merge
mj/registrace
into
devel
4 years ago
Overview
13
Commits
38
Changes
1
Implementace registrace podle
#220 (closed)
.
Edited
3 years ago
by
Martin Mareš
0
0
Merge request reports
Viewing commit
69ebb042
Show latest version
1 file
+
4
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
69ebb042
reg: fixup
· 69ebb042
Martin Mareš
authored
4 years ago
mo/web/auth.py
+
4
−
4
View file @ 69ebb042
Edit in single-file editor
Open in Web IDE
Show full file
@@ -7,7 +7,7 @@ from flask_wtf import FlaskForm
import
random
import
secrets
from
sqlalchemy.orm
import
joinedload
from
typing
import
Optional
,
Tuple
from
typing
import
Optional
import
werkzeug.exceptions
import
wtforms
from
wtforms
import
validators
,
ValidationError
@@ -319,7 +319,7 @@ class Reg1Form(FlaskForm):
try
:
field
.
data
=
mo
.
users
.
normalize_email
(
field
.
data
)
except
mo
.
CheckError
as
e
:
raise
wtforms
.
ValidationError
(
str
(
e
))
raise
ValidationError
(
str
(
e
))
@app.route
(
'
/auth/create
'
,
methods
=
(
'
GET
'
,
'
POST
'
))
@@ -441,11 +441,11 @@ class Reg2Form(FlaskForm):
def
validate_passwd
(
form
,
field
):
if
not
mo
.
users
.
validate_password
(
field
.
data
):
raise
wtforms
.
ValidationError
(
mo
.
users
.
password_help
)
raise
ValidationError
(
mo
.
users
.
password_help
)
def
validate_passwd2
(
form
,
field
):
if
field
.
data
!=
form
.
passwd
.
data
:
raise
wtforms
.
ValidationError
(
'
Hesla se neshodují.
'
)
raise
ValidationError
(
'
Hesla se neshodují.
'
)
@app.route
(
'
/auth/confirm
'
,
methods
=
(
'
GET
'
,
'
POST
'
))
Loading