@method_decorator(api_authentication_required)
    @csrf_exempt
    def route(self, request, **kwargs):
        method = request.method
        if method in self.allowed_methods:
            if hasattr(self, method.lower()):
                if method == 'PUT':
                    request.PUT = QueryDict(request.body if django.VERSION >= (1, 4) else request.raw_post_data).copy()
                return getattr(self, method.lower())(request, **kwargs)

            return HttpResponseNotImplemented()

        return HttpResponseNotAllowed(self.allowed_methods)
dataset/ETHPy150Open stephenmuss/django-ios-notifications/ios_notifications/api.py/BaseResource.route/original