Django returns 403 error when sending a POST request

后端 未结 7 2096
名媛妹妹
名媛妹妹 2021-01-31 08:27

when I\'m using following Python code to send a POST request to my Django website I\'m getting 403: Forbidden error.

url = \'http://www.sub.domain.com/\'
values          


        
7条回答
  •  -上瘾入骨i
    2021-01-31 08:31

    Django documentation provides several ways to ensure that CSRF tokens are included. See https://docs.djangoproject.com/en/1.11/ref/csrf/ for details.

提交回复
热议问题