Re: How to group by two fields simultaneously.

2008-07-15 Thread Malcolm Tredinnick
On Tue, 2008-07-15 at 11:24 -0700, Alex wrote: [...] > 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)

How to group by two fields simultaneously.

2008-07-15 Thread Alex
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 b