﻿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
20610	Add a message level dict to `contrib.messages.context_processors.messages`	Baptiste Mispelon	nobody	"It'd be nice if the provided context processor also added a dictionary of message levels to the context.

This would allow something like this:
{{{#!html+django
{% for message in messages %}
    {% if message.level == MESSAGE_LEVELS.SUCCESS %}...{% endif %}
    ...
{% endfor %}
}}}

Currently, one has to pass the message levels manually into the context, or do something like this, which is brittle:
{{{#!html+django
{% if 'success' i nmessage.tags %}...{% endif %}
}}}

There should not be any backwards-compatibility issue and the change is rather minimal.
I've attached a proof-of-concept patch. If there's interest, I'd be willing to polish it up (mostly adding tests and documentation)."	New feature	closed	contrib.messages	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
