CSRF token missing or incorrect

  • In your template:
    • put {% csrf_token %} inside your <form>
      eg: <form> {% csrf_token %} ... </form>
  • In your view:
    • from django.template import RequestContext
    • pass context_instance=RequestContext(request, {}) to render_to_response
About these ads

One thought on “CSRF token missing or incorrect

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s