title: Display messages on LogoutView
body: <p>I'm using the messages framework for basic things like success messages on user login. This is working fine. </p>
  
  <p>I can't get it to work when a user logs out, however. I'm not a web-developer so not particularly strong with django so not sure what i'm doing wrong - there are similar issues:
  <a href="https://stackoverflow.com/questions/11393929/django-message-when-logout">django message when logout</a>
  <a href="https://stackoverflow.com/questions/46542502/django-how-to-add-a-logout-successful-message-using-the-django-contrib-auth">Django How to add a logout successful message using the django.contrib.auth?</a>
  with solutions in using signals - before trying that I'd like to understand why my code below isn't working. I'm clearly missing something!</p>
  
  <p>Note in my template i've added a conditional to print some text if there are no messages - this text does print out so my messages.html is definitely being included.</p>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>class LogoutFormView(SuccessMessageMixin,LogoutView):
  template_name = 'users/logout.html'
  success_message = "Successfully logged out."
  
  class login_view(SuccessMessageMixin,LoginView):
  template_name = 'users/login.html'
  success_message = "Successfully logged in."
  def get_success_url(self):
      return reverse('recordings:projects')
  </code></pre>
  
  <p><strong>messages.html</strong></p>
  
  <pre><code>{% if messages %}
  {% for message in messages %}
  &lt;div class="alert {{ message.tags }} alert-dismissible" role="alert"&gt;
      &lt;button type="button" class="close" data-dismiss="alert" aria-label="Close"&gt;&lt;span
              aria-hidden="true"&gt;&amp;times;&lt;/span&gt; &lt;/button&gt;
      {{ message }}
  &lt;/div&gt;
  {% endfor %}
  {% endif %}
  </code></pre>
  
  <p><strong>in the template both my login redirect and logout.html extends:</strong></p>
  
  <pre><code>&lt;div class="container-fluid mt-3 pl-5 pr-5"&gt;
      {% block messages %}
      {% if messages %}
      test-messages
      {% else %}
      test-no-messages
      {% endif %}
      {% include "common/messages.html" %}
      {% endblock %}
  &lt;/div&gt;
  </code></pre>