Saturday, January 18, 2014

Re: csrf_token is not being set when using Jinja2

Try {% csrf_token %} by itself

On 19/01/2014 12:12 pm, "Chen Xu" <xuchen81@gmail.com> wrote:
Hi everyone,
I am using Jinja2 instead of Django's own template engine, however I am having an issue where csrf_token is empty, I included the following line in my form:

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

But csrf_token has no value.

Can someone help?


Thanks in advance


--
⚡ Chen Xu

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACac-qZ%3D6CT6yO48dQKEDX%3DuhCZ%2BXzrHraNa1qru2H%2BbCTP5rA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHqTbjkPA3nBDE0K5-Osdj2f5Wy4v9fFugLa%3DwPst-w5iRucEw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate