[Fixed]-Django: How can I remove all stored messages?

1👍

One way is to create 2 empty files templates/account/messages/logged_in.txt and templates/account/messages/logged_out.txt

It basically overwrites the login/logout messages.

Another way is to check in the template, such as:

--- Your code ---
{% if "signed" in message|safe %} 
  # Don't display anything
{% else %}
--- Your remaining code ---

Leave a comment