I have blog comment forms in Django and I would like to know the following:
Each tutorial or discussion on the subject seems to have a different approach, and I am not certain I understand how it all works.
My answer assumes that you are using Django 1.2:
render_comment_form
tag and you will see, that the csrf_token
is already included. You can overwrite this template in your project and including the CSRF token into it is as easy as writing {% csrf_token %}
into the form.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.