On 6/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Figured it out. Template wanted (for whatever reason)
> {% for foo in bar.foos.all %} instead of {% for foo in
> bar.foos_set.all %}This would all be a lot clearer if you would read the DB-api docs. The related-objects section explains this aspect of Django in great detail. http://www.djangoproject.com/documentation/db-api/#related-objects In short: Your Bar model has a foos attribute. Therefore, bar.foos.all(). Your Foo model has an implied attribute, because it is on the receiving end of a m2m relation with Bar. Therefore, foo.bar_set.all(). Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

