2👍
✅
You must ensure that:
The view function uses
RequestContext
for the template, instead ofContext
.
But you use:
return render_to_response('captcha.html', locals())
And, from the documentation to render_to_response
:
By default, the template will be rendered with a
Context
instance (filled with values from dictionary). If you need to use context processors, render the template with aRequestContext
instance instead.
So adding context_instance=RequestContext(request)
should solve the problem.
Source:stackexchange.com