Get your own Django server Result Size: 625 x 565
template.html
views.py
 
<!DOCTYPE html>
<html>
<body>

{% regroup cars by brand as newlist %}

{{ newlist }}

{% for x in newlist %}
  <h1>{{ x.grouper }}</h1>
  {% for y in x.list %}
    <p>{{ y.model }}: {{ y.year }}</p>
  {% endfor %}
{% endfor %}

<p>Check out views.py to see what the cars list looks like.</p>

</body>
</html>                  
127.0.0.1:8000/testing