Re: having an ManyToMany field, and have it optional

2010-02-11 Thread iliveinapark
I guess you're correct Atamert, though I'm sure this is still the case for ForeignKey fields, isn't it? On Feb 11, 8:16 pm, Atamert Ölçgen wrote: > On Thursday 11 February 2010 08:26:10 iliveinapark wrote:> Both are required > for a ForeignKey or ManyToManyField to be empty,

Re: having an ManyToMany field, and have it optional

2010-02-11 Thread Atamert Ölçgen
On Thursday 11 February 2010 08:26:10 iliveinapark wrote: > Both are required for a ForeignKey or ManyToManyField to be empty, ie: > > class GoalTag(models.Model): > goals = models.ManyToManyField(Goal, blank=True, null=True,) That is not true. Check contrib apps for examples. --

Re: having an ManyToMany field, and have it optional

2010-02-10 Thread iliveinapark
Both are required for a ForeignKey or ManyToManyField to be empty, ie: class GoalTag(models.Model): goals = models.ManyToManyField(Goal, blank=True, null=True,) On Feb 11, 5:20 pm, Atamert Ölçgen wrote: > On Thursday 11 February 2010 05:18:44 kamilski81 wrote:> Is it

Re: having an ManyToMany field, and have it optional

2010-02-10 Thread Atamert Ölçgen
On Thursday 11 February 2010 05:18:44 kamilski81 wrote: > Is it possible to do: > > class GoalTag(models.Model): > goals = models.ManyToManyField(Goal, null=True) Try blank=True. That null=True is possibly redundant there. -- Saygılarımla, Atamert Ölçgen -+- --+ +++ www.muhuk.com

having an ManyToMany field, and have it optional

2010-02-10 Thread kamilski81
Is it possible to do: class GoalTag(models.Model): goals = models.ManyToManyField(Goal, null=True) The reason why i ask is that a goal can have many tags, and a tag can belong to many goals. However, after a tag is input and a user deletes a goal, the tag should still remain in the