我需要一个提示来解决这个问题

时间:2018-09-04 05:39:22

标签: flask-wtforms

我有这个表格:

class RegisterForm(FlaskForm):
    """Registration form."""
    username = StringField('Username', validators=[Required(), Length(1, 64)])
    password = PasswordField('Password', validators=[Required(), Length(4, 4)])
    password_again = PasswordField('Password again',
                                   validators=[Required(), EqualTo('password'), Length(4, 4)])
    tc = SelectField(validators=[Required()],
            choices=[("m_", "Yes"),
            ("n", "No")])
    submit = SubmitField('Register')

我想在“ m_”旁边添加secrets.randbelow(n)

0 个答案:

没有答案