On 1/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Then I create the Movie object:
>
> class Movie(meta.Model):
> year = meta.SmallIntegerField()
> title = meta.CharField(maxlength=100)
> period = meta.CharField(maxlength=1, choices=PERIOD_CHOICES)
> plot = meta.TextField()
> awards = meta.ManyToManyField(Award)
> [...]
> The only catch is that in the Admin piece, I am required to select at
> least one award for any movie I enter, however the vast majority of
> movies have 0 awards. What's the best way to approach this?
Easy! Just add blank=True to the "awards" field on Movie, like so:
awards = meta.ManyToManyField(Award, blank=True)
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org