      from django.utils.decorators import classonlymethod
      from django.utils.functional import update_wrapper
  
      class View(_View):
          @classonlymethod
          def as_view(cls, **initkwargs):
              """
              Main entry point for a request-response process.
 
</s> remove # First implementation of Django class-based views did not include head method
# in base View class - https://code.djangoproject.com/ticket/15668
if django.VERSION >= (1, 4):
 </s> add if django.VERSION >= (1, 5): </s> remove         return [method.upper() for method in self.http_method_names
                if hasattr(self, method)]
 </s> add         return self._allowed_methods() </s> remove         Return the list of allowed HTTP methods, uppercased.
 </s> add         Wrap Django's private `_allowed_methods` interface in a public property. </s> remove         Called if `request.method` does not correspond to a handler method.
 </s> add         If `request.method` does not correspond to a handler method,
        determine what kind of exception to raise. </s> remove # Taken from @markotibold's attempt at supporting PATCH.
# https://github.com/markotibold/django-rest-framework/tree/patch
http_method_names = set(View.http_method_names)
http_method_names.add('patch')
View.http_method_names = list(http_method_names)  # PATCH method is not implemented by Django
 </s> add         # _allowed_methods only present from 1.5 onwards
        def _allowed_methods(self):
            return [m.upper() for m in self.http_method_names if hasattr(self, m)]


# PATCH method is not implemented by Django
if 'patch' not in View.http_method_names:
    View.http_method_names = View.http_method_names + ['patch']

        # 1.3 does not include head method in base View class
        # See: https://code.djangoproject.com/ticket/15668
      from django.utils.decorators import classonlymethod
      from django.utils.functional import update_wrapper
  
      class View(_View):
        # 1.3 does not include head method in base View class
        # See: https://code.djangoproject.com/ticket/15668
          @classonlymethod
          def as_view(cls, **initkwargs):
              """
              Main entry point for a request-response process.
keep keep keep add keep keep keep keep
 Minor cleaning up on View 
rest_framework/compat.py