That's got to be it. Thanks a lot, Daniel.

On Jan 30, 4:02 pm, Daniel Roseman <roseman.dan...@googlemail.com>
wrote:
> On Jan 30, 10:01 pm, steve <steveb...@gmail.com> wrote:
> <snip>
>
> >  The problem is that the form validation fails. And it's because I'm
> > sending a blank string in the category field. This field, in the
> > Ingredient table, is null=TRUE, so I was expecting it to work.
>
> <snip>
>
> > class Ingredient(models.Model):
> >     name = models.CharField(max_length=250)
> >     stock_status = models.PositiveSmallIntegerField()
> >     category = models.ForeignKey(Ingredcategory, null=True)
> >     user = models.ForeignKey(FhyUser)
> >     storename = models.CharField(max_length=50)
>
> Yes, you have set null=True - but you haven't set blank=True. Read
> this for the distinction, hopefully that should explain why your form
> validation is 
> failing:http://docs.djangoproject.com/en/dev/topics/db/models/#field-options
> --
> DR.
--~--~---------~--~----~------------~-------~--~----~
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