Tuesday, June 29, 2010

Admin.py: Creating double ended ManyToMany relationship

Hi everyone, considering these two classes.

class Foo(models.Model):
bar = models.ManyToManyField(Bar, blank=True, null=True,
default=None)

class Bar(models.Model):
pass

I have a many to many relationship in my admin page so I can select
multiple Bar objects on Foo, which is good, but I would also like to
select multiple Foo objects from Bar in the admin page. Is that
possible? How can I do that?

Thank you!

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment