Re: Editting both sides of self-referential m2m relationship

2006-08-21 Thread Russell Keith-Magee
On 8/21/06, James Punteney <[EMAIL PROTECTED]> wrote: Thanks for the responses, and yeah Maciej is correct the m2mrelationship works fine without any errors, it's just that I can onlyedit the prey relationship (as Maciej text art does a much better jobof showing than my explanation). Ok. Now we're

Re: Editting both sides of self-referential m2m relationship

2006-08-21 Thread Maciej Bliziński
On Mon, 2006-08-21 at 09:36 -0400, James Punteney wrote: > Right now if I add say a "rabbit" I'd have to go to edit every other > animal that is a predator of the rabbit to specify that the rabbit is > prey for those other animals vs just selecting the predators on the > rabbit edit page. Which is

Re: Editting both sides of self-referential m2m relationship

2006-08-21 Thread James Punteney
Thanks for the responses, and yeah Maciej is correct the m2m relationship works fine without any errors, it's just that I can only edit the prey relationship (as Maciej text art does a much better job of showing than my explanation). Right now if I add say a "rabbit" I'd have to go to edit every o

Re: Editting both sides of self-referential m2m relationship

2006-08-21 Thread Maciej Bliziński
On Mon, 2006-08-21 at 08:12 +0800, Russell Keith-Magee wrote: > And it works as expected except I can only edit the "prey" > part of the > relationship. Ideally I'd like to be able to specify both > predator and > prey when adding or editing an animal. Is th

Re: Editting both sides of self-referential m2m relationship

2006-08-20 Thread Russell Keith-Magee
On 8/21/06, James Punteney <[EMAIL PROTECTED]> wrote: class Animal(models.Model):  name = models.CharField(maxlength=200)  prey = models.ManyToManyField("self", related_name="predator",symmetrical=False, filter_interface=models.HORIZONTAL) And it works as expected except I can only edit the "prey"

Editting both sides of self-referential m2m relationship

2006-08-20 Thread James Punteney
I have an animal class that with a predator and prey relationship to itself. Each animal can have many other animals that are their predator and many other animals that are their prey. The appropriate part of the model is below. class Animal(models.Model): name = models.CharField(maxlength=200)