Hi,

On Wed, Jun 24, 2009 at 4:57 PM, adrian <adrian...@gmail.com> wrote:
>
>
> I need a time field that can be None.
>
> I define the field so that Null is legal in the DB:
>
> time_end = models.TimeField(blank=True, null=True)

> My question is why does this field give a validation error when None
> is selected, saying:

Because null=True, applies to the database. If you want to allow the
user select a null value, you also need to add blank=True

--
Kind Regards

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to