I have been using the Django Messaging Framework to display messages to a user in the template.
I am outputting them to the template like this:
Of course you can do it with {% regroup %} tag but you have to use dictsort filter aswell if you want to work properly. So firstly, tags should be sort by name and then group:
{% if messages %}
{% regroup messages|dictsort:"tags" by tags as message_list %}
{% for tags in message_list %}
{% endfor %}
{% endif %}