like that:

def clean_date(self):
        date = self.cleaned_data['date']

        if date < datetime.datetime.now():
            raise forms.ValidationError(_(u'Must be a future date'))
        return date


2014-07-15 12:29 GMT+01:00 <[email protected]>:

> i want validation in form.py in which the datetime should not be less than
> datetime.now
>
> please i need it urgently
>
> please help me
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/dda37413-d72f-4a5d-a9d8-b3ca72a4d82b%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/dda37413-d72f-4a5d-a9d8-b3ca72a4d82b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*monoBOT*
Visite mi sitio(Visit my site): monobotsoft.es/blog/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BxOsGBUD%3DShyBn7HbD8aOz9C36swSqV6nLxhoZ2bh7KibmjOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to