Beispiel #1
0
class FormCommande(wtf.Form):
    event = wtf.StringField(
        label='Selectionnez un evenement',
        validators=[validators.Required('Information Obligatoire')])
    date_livre = wtf.StringField(
        label='Date de livraison',
        validators=[validators.Required('Date obligatoire')])
    heure_livre = wtf.StringField(
        label='Heure de livraison',
        validators=[validators.Required('Date obligatoire'), current_time])
    date_anniv = wtf.StringField(
        label='Date d\'anniversaire',
        default=datetime.date.today().strftime("%d/%m/%Y"),
        validators=[date_anniv_existe])
    age = wtf.StringField(
        label='Age ',
        validators=[validators.Required('Information Obligatoire')])
    theme = wtf.StringField(
        label='Theme :',
        validators=[validators.Required('Information Obligatoire')])
    concerne = wtf.StringField(label='Concerne :',
                               validators=[concerne_existe])
    exixt_at_date = wtf.HiddenField(default='0')
    info = wtf.TextAreaField(label='Autres infos pour la livraison:')
    update = wtf.BooleanField(default=False)
Beispiel #2
0
class FormUser(wtf.Form):
    id = wtf.HiddenField()
    client = wtf.HiddenField()
    name = wtf.StringField(
        label='Nom et prenom :',
        validators=[validators.Required('information obligatoire')])
    phone = wtf.StringField(
        label='Telephone :',
        validators=[validators.Required('information obligatoire')])
    email = wtf.StringField(label='Adresse email :')
    login = wtf.StringField(label='login de connexion :',
                            validators=[execpt_login])
    profil = wtf.SelectField(label='Selection d\'un profil :',
                             coerce=int,
                             default=0)
Beispiel #3
0
class FormProfil(wtf.Form):
    id = wtf.HiddenField()
    name = wtf.StringField(
        label='Nom profil',
        validators=[
            validators.Required(message='Champ obligatoire'),
            validators.length(max=50), unique_code_validator
        ])
    description = wtf.TextAreaField(label='Description du profil')
    active = wtf.BooleanField(default=True)
Beispiel #4
0
class FormPassword(wtf.Form):
    password = wtf.PasswordField(
        label='Mot de passe',
        validators=[
            validators.Required('Mot de passe obligatoire'),
            password_validator, password_convert
        ])
    retype_password = wtf.PasswordField(
        label='Ressaisir le mot de passe',
        validators=[
            validators.EqualTo(
                'password',
                message='Les mots de passe ne sont pas similaires.')
        ])
Beispiel #5
0
class FormLogin(wtf.Form):
    email = wtf.StringField('Email ou login',
                            validators=[validators.Required()])
    password = wtf.PasswordField(
        'Mot de passe', [validators.Required("Le mot de passe est requis.")])
    submit = wtf.SubmitField("Connexion")
Beispiel #6
0
class FormPrixGateaux(wtf.Form):
    id = wtf.HiddenField()
    interval = wtf.StringField(label='Nombre de part :', validators=[validators.Required(message='Champ obligatoire')])
    prix = wtf.StringField(label='Prix Minimum :', widget=NumberInput(), validators=[validators.Required(message='Champ obligatoire')])
    categorie = wtf.SelectField(label='Votre categorie :', coerce=int, validators=[validators.Required(message='Champ obligatoire'), compare_part_interval])
Beispiel #7
0
class FormAutre(wtf.Form):
    id = wtf.HiddenField()
    name = wtf.StringField(label='Nom du produit :',  validators=[validators.Required(message='Champs obligatoire'), validators.length(max=50), unique_code_validator])
    prix = wtf.StringField(label='Prix :', widget=NumberInput(), validators=[validators.Required(message='Prix obligatoire')])
Beispiel #8
0
class FormGateau(wtf.Form):
    id = wtf.HiddenField()
    name = wtf.StringField(label='Nom du gateau :',  validators=[validators.Required(message='Champs obligatoire'), validators.length(max=50), unique_code_validator])
    prix = wtf.StringField(label='Prix Minimum :', widget=NumberInput(), validators=[validators.Required(message='Prix obligatoire')])
    category = wtf.StringField(label=' Categorie', validators=[validators.Required('Champs obligatoire')])
    part = wtf.StringField(label='Nombre de part', validators=[validators.Required('Champs obligatoire')])
Beispiel #9
0
class FormConfig(wtf.Form):
    id = wtf.HiddenField()
    type_data = wtf.HiddenField()
    name = wtf.StringField(label='Nom ', validators=[validators.Required(message='Champ obligatoire'), validators.length(max=50), unique_code_validator_config])
Beispiel #10
0
class FormTypeGateau(wtf.Form):
    id = wtf.HiddenField()
    name = wtf.StringField(label='Nom type gateau', validators=[validators.Required(message='Champ obligatoire'), validators.length(max=50), unique_code_validator])
    pr_sable = wtf.BooleanField(label='Utilise pour produit sable', default=False)