Re: TimeField and null

2009-06-25 Thread adrian
Thanks for that clear explanation, and your solution works great! Adrian On Jun 24, 9:23 pm, Karen Tracey wrote: > On Wed, Jun 24, 2009 at 3:57 PM, adrian 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.TimeFi

Re: TimeField and null

2009-06-24 Thread Karen Tracey
On Wed, Jun 24, 2009 at 3:57 PM, adrian 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) > > The form field is: > > time_end = forms.ChoiceField(required=False, choices=END_TIME_CHOICE

Re: TimeField and null

2009-06-24 Thread adrian
If you look, blank is set to True, and it still returns the validation error. On Jun 24, 3:25 pm, "Gabriel ." wrote: > Hi, > > On Wed, Jun 24, 2009 at 4:57 PM, adrian wrote: > > > I need a time field that can be None. > > > I define the field so that Null is legal in the DB: > > > time_end = mo

Re: TimeField and null

2009-06-24 Thread Gabriel .
Hi, On Wed, Jun 24, 2009 at 4:57 PM, adrian 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, say

TimeField and null

2009-06-24 Thread adrian
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) The form field is: time_end = forms.ChoiceField(required=False, choices=END_TIME_CHOICES) and END_TIME_CHOICES is: END_TIME_CHOICES = ( (None, 'En