title: Django - CSRF token missing or incorrect
body: <p>I just updated my django to 1.4. But I am getting the following error when I try to submit my login form:</p>
  
  <blockquote>
    <p>Forbidden (403)
    CSRF verification failed. Request aborted.
    Reason given for failure:
        CSRF token missing or incorrect.</p>
  </blockquote>
  
  <p>In my settings.py (MIDDLEWARE_CLASSES) I had to remove the following line because its now deprecated:</p>
  
  <pre><code>'django.middleware.csrf.CsrfResponseMiddleware',
  </code></pre>
  
  <p>And than I started to to get this error.</p>
  
  <p>Some necessary information:
  Urls.py</p>
  
  <blockquote>
  <pre><code>url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'registration/login.html'}, name='login')
  </code></pre>
  </blockquote>
  
  <pre><code>MIDDLEWARE_CLASSES = (
      'django.middleware.gzip.GZipMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
  #   'django.middleware.csrf.CsrfResponseMiddleware',
      'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
  )
  </code></pre>
  
  <p>login.html</p>
  
  <pre><code>{% extends "base.html" %}
  {% block title %} Login {% endblock %}
  {% block content %}
  
  
  
     &lt;div id="text"&gt;
          &lt;table&gt;
            &lt;form action="" method="post"&gt;
            {% csrf_token %}
              &lt;tr&gt;
                  &lt;td&gt;&lt;label for="username"&gt;Email:&lt;/label&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" name="username" value="" id="username"&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;label for="password"&gt;Password:&lt;/label&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;input type="password" name="password" value="" id="password"&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;input type="submit" value="Login" /&gt;
              {% if next %}
                  &lt;input type="hidden" name="next" value="{{ next }}" /&gt;&lt;/td&gt;
              {% else %}
                  &lt;input type="hidden" name="next" value="/" /&gt;&lt;/td&gt;
              {% endif %}
              &lt;/tr&gt;
            &lt;/form&gt;
          &lt;/table&gt;
  
  
        {% if form.errors %}
          &lt;p class="error"&gt;User or password incorrect&lt;/p&gt;
        {% endif %}
      &lt;/div&gt;
  {% endblock %}
  </code></pre>
  
  <p>Does anyone knows how to solve this problem?</p>