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
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
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
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
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
5 matches
Mail list logo