Malcolm, thanks very much for this. I don't have time to properly look at this until Monday but I wanted to at least acknowledge before then my appreciation of your replies. I'll no doubt be back with either more thanks or more questions.
On Mar 21, 4:55 am, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: > On Sat, 2009-03-21 at 15:48 +1100, Malcolm Tredinnick wrote: > > [...] > > > {% regroup status_counts by provider as s_counts %} > > > {% for object in s_counts %} > > {% ifchanged object.provider %} > > {{ object.provider__name }} > > {{ object.provider__address }} > > {{ object.provider__rating }} > > {% endifchanged %} > > {{ object.status }}: {{ object. num }} > > {% endfor %} > > Aaargh! I changed my mind halfway through writing that solution and > forgot to go back. I'm using the results of the regroup tag badly, so > check the docs if you want to use that approach. My original approach > was to order the queryset and then use "ifchanged" and then I realised > the regroup tag solves that problem already. > > So, ignore the slight Frankenstein's monster result that came out. Think > of it as two solutions for the price of one, but you have to untangle > them in order to make either work. > > Regards, > Malcolm --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---