Ejemplo n.º 1
0
Archivo: menu.py Proyecto: GearL/pika
class menu(FlaskForm):
    mid = HiddenField()
    mname = StringField(validators=[
        validators.DataRequired(),
        validators.length(min=2, max=16)
    ])
    type = IntegerField(validators=[validators.DataRequired()])
    query_id = IntegerField(validators=[validators.DataRequired()])
    father_mid = HiddenField()  # 区分二级目录归在哪个一级目录下
    url = StringField(validators=[validators.DataRequired()])
Ejemplo n.º 2
0
class SpammerForm(Form):
    address = StringField(u"Address Entry", [
        validators.DataRequired(message=u"You must enter an address."),
        validators.Regexp(
            reg,
            flags=0,
            message=u"Invalid address. The address must begin with an '@'.")
    ])
    submit = SubmitField()
Ejemplo n.º 3
0
class SpammerForm(Form):
    error_msg = u"""The address you tried to add is wrong. Please type it 
like this:<ul><li>Everything <em>after</em> the "@" sign, with no spaces.</li>
<li>Example: <strong>enterprise-weasels.co.uk</strong></li></ul>"""
    address = StringField(u"Address Entry", [
        validators.DataRequired(message=u"You have to enter an address."),
        validators.Regexp(reg, flags=0, message=error_msg)
    ])
    submit = SubmitField()