Django message framework doesn't show messages

Viewed 23

I have a flow where one page adds a message to Django's message store (CookieStore) and another page displays that message (by rendering it onto a template). All works nicely in most environments. However I have one environment where the message doesn't show. I can see the cookie being set, but it is not getting removed in the "other" page load.

My question is - are there any env variables that may be preventing the messages from being cleared from store and rendered onto a page, or any other settings to look out for? This environment is not easy to debug, so I can't set any breakpoints and searching the code didn't reveal anything obvious.

Here's the template part to display messages

{% block messageblock %}
   {% if messages %}
      {% for message in messages %}
         {{ message }}
       {% endfor %}
   {% endif %}
{% endblock %}
0 Answers
Related