﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27126	Use `namedtuple` in result of `{% regroup %}`	Baptiste Mispelon	nobody	"Currently, `{% regroup %}` returns a list of dictionaries with two key (`grouper` and `list`).

I propose chaning that to return a namedtuple with the same fields.

This should be backwards-compatible because attribute access and key access inside template uses the same syntax.

The added benefit would be that you could now write:
{{{#!django
{% regroup places by country as country_list %}

<ul>
{% for country, cities in country_list %}
    <li>{{ country }}
    <ul>
        {% for city in cities %}
          <li>{{ city.name }}: {{ city.population }}</li>
        {% endfor %}
    </ul>
    </li>
{% endfor %}
</ul>

}}}"	Cleanup/optimization	new	Template system	1.10	Normal				Unreviewed	1	0	0	0	0	0
