csrf_exempt for class based views
class ErrorReportView(View): def get(self, request, *args, **kwargs): return HttpResponse(‘Hello, World!’) @method_decorator(csrf_exempt) def post(self, request, *args, **kwargs): return HttpResponse(‘Hello, World!’) I use Postman, but I get <p>CSRF verification failed. Request aborted.</p> Documentation: https://docs.djangoproject.com/en/4.1/topics/class-based-views/intro/#decorating-the-class Could you help me? >Solution : The csrf_exempt decorator should be applied to "dispatch" method. You can add the following decorator directly on… Read More csrf_exempt for class based views