On Nov 15, 2005, at 2:15 AM, Sean Perry wrote:
The {% regroup %} tag looked promising, but I can not get it to work.
{% regroup user.get_thing_list|dictsort:"category" by category
as grouped %}
You have to group by actual fields (and not relationship names), so
to Things by Category you would need to do something like::
{% regroup thing_list|dictsort:"category_id" by category_id as
grouped %}
(Of course, if you wanted to make sure your list was in order sorted
by the *title* of your category, which would certainly look nicer,
you probably would want::
{% regroup thing_list|dictsort:"description" by description as
grouped %}
)
Clear as mud?
Jacob