title: Django - How to send a success message using a UpdateView CBV
body: <p>(first of all sorry for my bad english)
  I'm trying to show a message in a UpdateView when the users save the changes!</p>
  
  <p>This is my view</p>
  
  <pre><code>class NeedUpdateView(UpdateView):
      model = Need
      template_name = 'purchases/needs_update_form.html'
      pk_url_kwarg = 'need_id'
      success_message = 'List successfully saved!!!!'
      fields = [
          'detail',
      ]
  </code></pre>
  
  <p>When you save the app loads the same template! but i like to show a bootstrap alert if save the object!</p>
  
  <p>This is code in the template to show the message</p>
  
  <pre><code>{% if messages %}
  &lt;div class="alert alert-success"&gt;
      {% for m in messages %}
      &lt;li{% if message.tags %} class="{{ message.tags }}"{% endif %}&gt;{{ m }}&lt;/li&gt;
      {% endfor %}
  &lt;/div&gt;
  {% endif %}
  </code></pre>
  
  <p>and in the settings i add this </p>
  
  <pre><code>MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
  </code></pre>
  
  <p>But the i can't show the messages! The changes in the object are saving fine only need to show the message!</p>
  
  <p>EDIT: i show here my settings to show that i follow all the steps in the docs</p>
  
  <pre><code>MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.locale.LocaleMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  DJANGO_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
  ]
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [os.path.join(BASE_DIR, "templates")],
          'APP_DIRS': True,
          'OPTIONS': {
              'context_processors': [
                  'django.template.context_processors.debug',
                  'django.template.context_processors.request',
                  'django.contrib.auth.context_processors.auth',
                  'django.contrib.messages.context_processors.messages',
                  'django.template.context_processors.i18n',
                  'apps.cart.context_processors.cart',
              ],
          },
      },
  ]
  </code></pre>