วันอาทิตย์ที่ 10 ตุลาคม พ.ศ. 2564

[DJANGO] Web Dev - How to solve "csrf verification failed. request aborted."

 [DJANGO] Web Development  
How to solve "csrf verification failed. request aborted."

csrf verification failed

For past 5 week(1 September 2021), I come back to learn Python Django Web Development for Beginner by Uncle Engineer in Thailand.

I learned about Creating Form and insert to Database(SQL Lite). But when I inserted info in Textbox and click Submit info. I saw errors "Forbidden (403) - CSRF verification failed. request aborted".

         The way to solve this Errors that is easy.
        

        First, Go to HTML tag Form.
        Next, Insert "
{% csrf_token %}" below  HTML tag Form.
        Finally, Save and Refresh website again. Clear!!!
        

csrf verification failed