title: Django Messages working only after manual page refresh when I try display error about existing user
body: <p>In my Django project I want to use Django Message ( from django.contrib import messages) to display error when user or email exist.</p>
  
  <p>Unfortunately my views not working.</p>
  
  <p>HTML:</p>
  
  <pre><code>{% for message in messages %}
    &lt;p&gt;{{ message }}&lt;/p&gt;
  {% endfor %}
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>def account_signup(request):
      if request.method == 'POST':
          nick = request.POST['nick']
          email = request.POST['email']
          password = request.POST['password']
  
          user_model = get_user_model()
          if user_model.objects.filter(username__iexact=nick).exists():
              messages.warning(request, 'Please correct the error below.')
              return render(request, "account/account_signup.html", context={'is_taken_email': email, 'messages': messages})
  
          if user_model.objects.filter(email__iexact=email).exists():
              messages.warning(request, 'Please correct the error below.')
              return render(request, "account/account_signup.html", context={'is_taken_email': email, 'messages': messages})
  
          user = User.objects.create_user(username=nick, email=email, password=password)
          user.save()
          return HttpResponse(status=202)
      else:
          """Return template with sign up page."""
          return render(request, "account/account_signup.html")
  </code></pre>
  
  <p>I cant find a reason. 
  Thanks in advance!</p>