mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2026-10-15 20:04:35 +00:00
Rename and rework profile packege (new name settings)
This commit is contained in:
1 parent
1092033a19
commit
700e11ec23
15 files changed
+316
-288
No files matched your search
@@ -1,3 +1,4 @@
|
||||
from flask import current_app
|
||||
from ..models import User
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import (BooleanField, PasswordField, StringField, SubmitField,
|
||||
@@ -17,9 +18,9 @@ class RegistrationForm(FlaskForm):
|
||||
username = StringField(
|
||||
'Username',
|
||||
validators=[DataRequired(), Length(1, 64),
|
||||
Regexp('^[A-Za-z][A-Za-z0-9_.]*$', 0,
|
||||
'Usernames must have only letters, numbers, dots '
|
||||
'or underscores')]
|
||||
Regexp(current_app.config['ALLOWED_USERNAME_REGEX'],
|
||||
message='Usernames must have only letters, numbers,'
|
||||
' dots or underscores')]
|
||||
)
|
||||
password = PasswordField(
|
||||
'Password',
|
||||
|
||||
Reference in new issue
Block a user