[Answer]-Calling a templatetag from a view — CSRF not gtting populated

0👍

Need to make the context a RequestContext.

context = RequestContext(request, {....})
👤TAH

1👍

I don’t understand the core of the problem, but you can always manually pull the token (the middleware calls this function).

from django.middleware.csrf import get_token

csrf = get_token(request)

Leave a comment