As a part of my error response I am trying to add "show" to a collapsable container using something like:
class="{{request.session.registration}}"
but instead of session use django messages so the "show" does not persist.
Right now I'm using a pretty janky workaround where I loop through all messages:
<form action = "registration" method = "POST" id="registration"
class="collapse container
{% for message in messages %}
{% if 'registration' in message.tags%}
{{message}}
{% endif %}
{% endfor %}
">
for reference, the message is added in the views.py via:
messages.info(request, 'show', extra_tags='registration')
How can I call this message explicitly?