mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-20 13:00:36 +00:00
Rename and rework profile packege (new name settings)
This commit is contained in:
@ -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