I have the following: Model Person Model Stat Model Stat Value Model Team
A Team has a set of Stats relevant to it. A person is on multiple teams, and has stats for his/her performance on that team which are stored as Stat Values. Stat values are unique by Person, Stats, and Team. I want to build a view that will show team overviews from the point if view of a single specific person. All his/teams, and the associated stats. So my view throws out a list of teams, filtered to the person and my template looks like this: {% for t in teams %} {% for s in t.getStats %} ** I WANT TO NOW DO SOMETHING LIKE: ** {% for v in s.getStatValues(Person,s) %) ** EXCEPT THAT I CAN'T PASS ARGS IN A TEMPLATE. ** But if I don't pass in those arguments I'll get all the statValues for everyone on the team, not just the person I'm looking at. I wouldn't retrieve it all and then put an {% if v.person=p %} or similar in the template would I? This must be something fairly common. What am I doing wrong? It's an easy SQL statement to write, but how to do it Django style? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---