美文网首页
django 后端禁用csrf

django 后端禁用csrf

作者: Aedda | 来源:发表于2022-02-23 18:44 被阅读0次
    from django.utils.decorators import method_decorator
    from django.views.decorators.csrf import csrf_exempt
    
    
    @method_decorator(csrf_exempt, name='dispatch')
    class ViewRPALogin(View):
        def post(self, request):
    
    from django.views.decorators.csrf import csrf_exempt
    
    
    @csrf_exempt
    def dasd(request):
        pass
    
    from django.views.decorators.csrf import csrf_exempt
    
    
    class ViewRPALogin(View):
        @csrf_exempt
        def post(self, request):
    

    相关文章

      网友评论

          本文标题:django 后端禁用csrf

          本文链接:https://www.haomeiwen.com/subject/tetalrtx.html