Why do it inside the template?  Do it inside the view and pass each
resultant queryset to the template.

On Jul 16, 1:59 am, ZebraShaSha <zebrasha...@gmail.com> wrote:
> This seems like a simple question, but it's been bugging me for days
> now. I have two models, Events and Categories, where Events has a FKF
> to Categories. I'm using django-Agenda, an add-on that I've modified
> with the categories model, so all the views/urls are perfect in every
> other way except they don't take into account this new model.
>
> That means that right now, the info_dict that's supplying all the
> views is essentially Events.objects.all(). What I want to do, inside
> of a template, is reorder the list of events into two lists, ordered
> by events.categories.title or whatever.
>
> I've tried the reorder filter (didn't really work) and I've tried
> multiple For and Ifequal loops, which was cumbersome and didn't scale
> at all. I know this has to be a pretty common problem, but I can't
> find any solutions.  Suggestions? Any ideas?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to