This doesn't exactly answer your question (because I'm a huge noob still), but M2M relationships work in both directions: http://www.djangoproject.com/documentation/db-api/#many-to-many-relationships
I think to access it in the template, you'd just need to pass the information from your view? On Jun 6, 1:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I know I'm making this harder than it has to be, but the logic is just > escaping me. > > I've got two models, say "Foo" and "Bar" > > "Bar" establishes a manyToManyField relationship with "Foo": > foos = models.ManyToManyField(Foo, > filter_interface=models.HORIZONTAL, null=True, blank=True) > > I'm using a generic detail template for Foo, and want to include the > matching Bars. > Since Bar has the mtm and Foo doesn't, I figured Bar was aware of Foo, > but not the other way around, and therefore I would need a template > tag. > > So assuming my logic so far is OK, how should I get the correct Bar > objects (the ones that have a matching Foo in foos)? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---