class RegistrationForm(Form): username = TextField(u'Введите логин', [validators.Length(min=4, max=25)]) password = PasswordField(u'Введите пароль', [ validators.Required(), validators.EqualTo('confirm', message=u'Пароли должны совпадать') ]) confirm = PasswordField(u'Повторите Ваш пароль еще раз')
class AddEventForm(FlaskForm): description = StringField('Name of Event', validators=[validators.Length(min=4, max=25)]) organizer = SelectField('Organizer', coerce=int) venue = StringField('Place of Event') start_time = DateTimeField('Starting from', format="%d-%m-%y") end_time = DateTimeField('Ending at', format="%d-%m-%y") submit = SubmitField('Add Event')
class RegisterForm(Form): """ The register form. """ username = TextField('Username', [validators.Required(), validators.Length(min=1, max=80), username_check]) password = PasswordField('Password', [validators.Required()]) password_repeat = PasswordField('Repeat password', [validators.EqualTo('password', message='Passwords must match.')]) email = EmailField('Email', [validators.Required(), email_check]) recaptcha = RecaptchaField()
class NetworkForm(Form): """ The network form. """ name = TextField('Name', [validators.Required(), validators.Length(min=1, max=80)]) ipv4_address = IPTextField('IPv4 network', ip_version=4, network_only=True) ipv6_address = IPTextField('IPv6 network', ip_version=6, network_only=True) members = FieldList(FormField(NetworkMemberForm))
class LoginForm(Form): """ The login form. """ username = TextField( 'Username', [validators.InputRequired(), validators.Length(min=1, max=80)]) password = PasswordField('Password', [validators.InputRequired()]) recaptcha = RecaptchaField() remember_me = BooleanField('Remember me')
class RegistrationForm(Form): login = StringField( 'Login', [validators.Length(min=4, max=25), validators.DataRequired()]) password = PasswordField('Password', [ validators.DataRequired(), validators.EqualTo('verification', message='Passwords must match') ]) full_name = StringField('Full name', [validators.DataRequired()]) verification = PasswordField('Repeat password', [validators.DataRequired()]) email = StringField('Email', [ validators.Length(min=6, max=35), validators.Email(), validators.DataRequired() ])
class UserForm(Form): """ The user form. """ username = TextField( 'Username', [validators.Required(), validators.Length(min=1, max=80)]) current_password = PasswordField('Current password', [validators.Optional()]) new_password = PasswordField('New password', [validators.Optional()]) new_password_repeat = PasswordField( 'Repeat new password', [validators.EqualTo('new_password', message='Passwords must match.')]) email = EmailField('Email', [validators.Required()]) networks = FieldList(FormField(UserMemberForm)) admin_flag = BooleanField('Has administrative privileges')
class LoginForm(Form): email = TextField('Email', [validators.Length(min=6, max=35), validators.Email()]) password = PasswordField('Password', [Required()])
class RegistrationForm(Form): name = TextField('Name', [validators.Length(min=1, max=25)]) email = TextField('Email', [validators.Length(min=6, max=35), validators.Email()]) password = PasswordField('Password', [Required()])
class AskQuestionForm(Form): question = TextField(u'Введите вопрос', [validators.Length(min=10, max=128)])