📜  csrf 令牌豁免 django - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:24.876000             🧑  作者: Mango

代码示例1
from django.views.decorators.csrf import csrf_exempt

@csrf_exempt
def xyx(request):
  #your code
  
#this makes the function accept post request without csrf token
#use it just for quick check or for operations where csrftoken authentication
#isn't required