示例#1
0
def current_time(form, field):
    time = function.time_convert(field.data)
    if function.date_convert(form.date_livre.data) == datetime.date.today():
        if function.datetime_convert(date_auto_nows).time() > time:
            raise wtf.ValidationError(
                'l\'heure de livraison doit etre superieur a l\'heure en cours'
            )
示例#2
0
def control_pass_date(form, field):
    date = function.date_convert(field.data)
    if datetime.date.today() > date:
        raise wtf.ValidationError('Appliquez les taux horaires sur une date futur ou actuelle.')
示例#3
0
def schedule_activate(form, field):
    time = function.time_convert(field.data)
    if function.date_convert(form.departure_date.data) == datetime.date.today():
        if function.datetime_convert(date_auto_nows).time() >= time:
            raise wtf.ValidationError('Time of departure of the current date must be greater than or equal to the current time.')
示例#4
0
def departure_date_activate(form, field):
    date = function.date_convert(field.data)
    if datetime.date.today() > date:
        raise wtf.ValidationError('The departure date must be greater than or equal to the current date.')
示例#5
0
def current_date(form, field):
    date = function.date_convert(field.data)
    if datetime.date.today() > date and not form.update.data:
        raise wtf.ValidationError(
            'La date de livraison doit etre superieur ou egale a la date d\'aujourd\'huit.'
        )
示例#6
0
def current_time(form, field):
    time = function.time_convert(field.data)
    if function.date_convert(form.date_livre.data) == datetime.date.today():
        if function.datetime_convert(date_auto_nows).time() > time:
            raise wtf.ValidationError('l\'heure de livraison doit etre superieur a l\'heure en cours')
示例#7
0
def current_date(form, field):
    date = function.date_convert(field.data)
    if datetime.date.today() > date and not form.update.data:
        raise wtf.ValidationError('La date de livraison doit etre superieur ou egale a la date d\'aujourd\'huit.')