[Fixed]-Django's {{ csrf_token }} is outputting the token value only, without the hidden input markup

52👍

You have to use it as tag {% csrf_token %} not as a variable passed by your view {{csrf_token}}

👤Pannu

11👍

I use the next in my templates to solve your problem:

<input type='hidden' name='csrfmiddlewaretoken' value='{{ csrf_token }}' />

Leave a comment