How do I include Django 1.2's CSRF token in a Javascript-generated HTML form?

前端 未结 6 1696
感动是毒
感动是毒 2020-12-09 05:45

I recently upgraded to Django 1.2.3 and my upload forms are now broken. Whenever I attempt to upload, I receive a \"CSRF verification failed. Request aborted.\" error messag

6条回答
  •  遥遥无期
    2020-12-09 06:18

    This may not be ideal, but it was the fastest solution for me. In my main template at the bottom of the "body", I added a javascript function to my library.

    
    

提交回复
热议问题