title: CSRF cookie not set django...verification failed
body: <p>AoA
      I am new to Django, I am trying to get data from POST, but getting error CSRF cookie not set, I tried alot to find the solution on google and stackoverflow via google too, but failed</p>
  
  <p>here is the code</p>
  
  <h1>views.py</h1>
  
  <pre><code>    from django.http import HttpResponse
      from django.template.loader import get_template
      from django.template import Context
      from django.template import RequestContext
      from django.core.context_processors import csrf
      from django.shortcuts import render_to_response
  
  def search_Post(request):
      if request.method == 'POST':
              c = {}
          c.update(csrf(request))
          # ... view code here
                  return render_to_response("search.html", c)
  
  def search_Page(request):
      name='Awais you have visited my website :P'
      t = get_template('search.html')
      html = t.render(Context({'name':name}))
      return HttpResponse(html)
  </code></pre>
  
  <h1>HTML File</h1>
  
  <pre><code>&lt;p&gt;
            {{ name }}
              &lt;form method="POST" action="/save/"&gt;
                {% csrf_token %}
                &lt;textarea name="content" rows="20" cols="60"&gt;{{content}}&lt;/textarea&gt;&lt;br&gt;
                &lt;input type="submit" value="Save Page"/&gt;
              &lt;/form&gt;
         &lt;div&gt;  Cant figure out any solution! :( &lt;/div&gt;
  
   &lt;/p&gt;
  </code></pre>
  
  <h1>url.py</h1>
  
  <pre><code> url(r'^home/$', 'contacts.views.home_Page'),
   url(r'^save/$', 'contacts.views.search_Post'),
   url(r'^edit/$', 'contacts.views.edit_Page'),
   url(r'^search/$', 'contacts.views.search_Page'),
  </code></pre>
  
  <h1>settings.py</h1>
  
  <pre><code>TEMPLATE_CONTEXT_PROCESSORS = (
      'django.core.context_processors.csrf',
      'django.contrib.auth.context_processors.auth',
      'django.core.context_processors.debug',
      'django.core.context_processors.i18n',
      'django.core.context_processors.media',
      'django.core.context_processors.static',
      'django.core.context_processors.request',
      'django.contrib.messages.context_processors.messages'
  )
  
  MIDDLEWARE_CLASSES = (
      'django.middleware.common.CommonMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      # Uncomment the next line for simple clickjacking protection:
      # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  )
  </code></pre>