title: django redirect with messages
body: <p>What is the best practice to avoid multiple form submission and in the same time display message notification after form submission ?</p>
  
  <p>To avoid multiple form submission I use redirect instead of render</p>
  
  <pre><code>return redirect(post.get_absolute_url())
  </code></pre>
  
  <p>But if add a message and then redirect, there is no message displayed. Here is the whole view settings:</p>
  
  <pre><code>def post_detail(request, year, month, day, post):
      post = get_object_or_404(Post, slug=post,
                                     status='published',
                                     publish__year=year,
                                     publish__month=month,
                                     publish__day=day)
  
      # List of active comments for this post
      comments = post.comments.filter(active=True)   
  
      if request.method == 'POST':
          # A comment was posted
          comment_form = CommentForm(data=request.POST)
  
          if comment_form.is_valid():
              # Create Comment object but don't save to database yet
              new_comment = comment_form.save(commit=False)
              # Assign the current post to the comment
              new_comment.post = post
              # Save the comment to the database
              new_comment.save()
              messages.success(request, 'Comment successfully added')
              return redirect(post.get_absolute_url())
      else:
          comment_form = CommentForm()
  
      return render(request, 'blog/post/detail.html', {'post': post,
                                                       'comments': comments,
                                                       'comment_form': comment_form})
  </code></pre>
  
  <p>In the view file, i catch all messages to debug</p>
  
  <pre><code>{% if messages %}
  &lt;ul class="messages"&gt;
      {% for message in messages %}
      &lt;li{% if message.tags %} class="{{ message.tags }}"{% endif %}&gt;{{ message }}&lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  {% endif %}
  </code></pre>
  
  <p>Of course, if I use render instead of redirect, everything works fine but I still have the "multiple form submission" issue if I refresh the page.</p>