class FormBudget(wtf.Form):
    disponible = wtf.FloatField(
        label='Temps Disponible :',
        default=0,
        validators=[
            validators.NumberRange(
                min=1, message='La disponibilite doit etre plus de 0'),
            verif_dispobilite
        ])
    administration = wtf.FloatField(
        label='Administration (en H) :',
        default=0,
        validators=[validators.NumberRange(min=0, message='Valeur Minimal 0')])
    production = wtf.FloatField(
        label='Production (en H) :',
        default=0,
        validators=[validators.NumberRange(min=0, message='Valeur Minimal 0')])
    formation = wtf.FloatField(
        label='Formation (en H) :',
        default=0,
        validators=[validators.NumberRange(min=0, message='Valeur Minimal 0')])
    developpement = wtf.FloatField(
        label='Developpement (en H) :',
        default=0,
        validators=[validators.NumberRange(min=0, message='Valeur Minimal 0')])
Exemple #2
0
class TaskRedundancyForm(Form):
    n_answers = IntegerField(lazy_gettext('Redundancy'),
                             [validators.Required(),
                              validators.NumberRange(
                                  min=1, max=1000,
                                  message=lazy_gettext('Number of answers should be a \
                                                       value between 1 and 1,000'))])
Exemple #3
0
class TaskPriorityForm(Form):
    task_ids = TextField(lazy_gettext('Task IDs'),
                         [validators.Required(),
                          pb_validator.CommaSeparatedIntegers()])

    priority_0 = DecimalField(lazy_gettext('Priority'),
                              [validators.NumberRange(
                                  min=0, max=1,
                                  message=lazy_gettext('Priority should be a \
                                                       value between 0.0 and 1.0'))])