Exemplo n.º 1
0
class RegistrationForm(Form):
    username = fields.TextField('Email Address',
                                validators=[REQUIRED,
                                            validators.email()])
    password = fields.PasswordField('Password', validators=[REQUIRED])
    password_confirm = fields.PasswordField('Confirm the password',
                                            validators=[REQUIRED])
    namespace = fields.TextField('Namespace',
                                 validators=[REQUIRED, unique_namespace])
    timezone = fields.TextField('Timezone', validators=[REQUIRED])
Exemplo n.º 2
0
class AddPhotoForm(Form):
    image = fields.FileField(u'Add an Image', )
    name = fields.TextField('Your name', validators=[
        REQUIRED,
    ])
    lat = fields.FloatField(' ', widget=widgets.HiddenInput())
    lon = fields.FloatField(' ', widget=widgets.HiddenInput())
Exemplo n.º 3
0
class CreateForm(Form):
    hash = fields.TextField(
        'Hash',
        validators=[
            ensure_hash,
            validators.Regexp('^[0-9A-Za-z]{0,100}$',
                              message="Hashes may only use A-Z, a-z and 0-9")
        ])
    """
	redirector1 = fields.SelectField('redirector1')
	redirector2 = fields.SelectField('redirector2')
	redirector3 = fields.SelectField('redirector3')
	redirector4 = fields.SelectField('redirector4')
	
	redirect1 = fields.TextField('redirect1')
	redirect2 = fields.TextField('redirect2')
	redirect3 = fields.TextField('redirect3')
	redirect4 = fields.TextField('redirect4')
	"""
    desc = fields.TextField('Link Description', validators=[REQUIRED])
    ios = fields.TextField(
        'iOS (iPhone/iPad/iPod)',
        validators=[validators.URL(), validators.Optional()])
    android = fields.TextField(
        'Android', validators=[validators.URL(),
                               validators.Optional()])
    webOS = fields.TextField(
        'webOS (HP/Palm)',
        validators=[validators.URL(), validators.Optional()])
    blackberry = fields.TextField(
        'Blackberry', validators=[validators.URL(),
                                  validators.Optional()])
    default = fields.TextField('Default',
                               validators=[REQUIRED,
                                           validators.URL()])
Exemplo n.º 4
0
class SigninForm(Form):
#    csrf_protection = True
    email = fields.TextField(_('Email'), [req, emailsize, emailformat])
    password = fields.PasswordField(_('Password'), [req, passize])
    remember = fields.BooleanField(_('Keep me signed in')) 
Exemplo n.º 5
0
class SignupForm(Form):
#    csrf_protection = True
    username = fields.TextField(_('User name'), [req, namesize])
    email = fields.TextField(_('Email'), [req, emailsize, emailformat])
    password = fields.PasswordField(_('New Password'), [req, passize]) # match
Exemplo n.º 6
0
class LocationForm(Form):
    family = fields.SelectField()
    location = fields.TextField('Redirect URL', validators=[validators.URL()])
Exemplo n.º 7
0
class LoginForm(Form):
    username = fields.TextField('Email Address', validators=[REQUIRED])
    password = fields.PasswordField('Password', validators=[REQUIRED])
    remember = fields.BooleanField('Keep me signed in')
Exemplo n.º 8
0
class RegistrationForm(Form):
    username = fields.TextField('Username', validators=[REQUIRED])
    password = fields.PasswordField('Password', validators=[REQUIRED])
    password_confirm = fields.PasswordField('Confirm the password',
                                            validators=[REQUIRED])
Exemplo n.º 9
0
class SignupForm(Form):
    nickname = fields.TextField('Nickname', validators=[REQUIRED])