[Answered ]-Django: name 'csrf_token' is not defined

2👍

You need to check out your MIDDLEWARE_CLASSES and ensure that the CSRF middleware is in there. As of Django 1.2, this was django.middleware.csrf.CsrfViewMiddleware — ensure that you’re using the right class by reading the Django documentation on middleware.

Leave a comment