1👍
✅
Are you updating your context with the csrf token when calling render_to_response
from a POST request? Like so:
from django.core.context_processors import csrf
from django.shortcuts import render_to_response
def my_view(request):
if request.method == 'POST':
c = {}
c.update(csrf(request))
return render_to_response("a_template.html", c)
else:
# GET code...
Source:stackexchange.com