  
  import unittest
  try:
      import unittest.skip
  except ImportError: # python < 2.7
      from unittest import TestCase
      import functools 
  
      def skip(reason):
          # Pasted from py27/lib/unittest/case.py
 
</s> remove # reverse_lazy (Django 1.4 onwards)
try:
    from django.core.urlresolvers import reverse_lazy
except:
    from django.core.urlresolvers import reverse
    from django.utils.functional import lazy
    reverse_lazy = lazy(reverse, str)
 </s> add  </s> remove except ImportError: # python < 2.7
 </s> add except ImportError:  # python < 2.7 </s> remove from djangorestframework.compat import reverse_lazy as django_reverse_lazy
 </s> add from django.utils.functional import lazy </s> remove     url(r'^(?P<pk>[0-9]+)/$', InstanceModelView.as_view(resource=MyModelResource)),
 </s> add     url(r'^(?P<id>[0-9]+)/$', InstanceModelView.as_view(resource=MyModelResource), name='model-resource-instance'), </s> remove     Objects that a resource can act on include plain Python object instances, Django Models, and Django QuerySets.
 </s> add     Objects that a resource can act on include plain Python object instances,
    Django Models, and Django QuerySets.
except ImportError:  # python < 2.7
  
  import unittest
  try:
      import unittest.skip
except ImportError:  # python < 2.7
      from unittest import TestCase
      import functools 
  
      def skip(reason):
          # Pasted from py27/lib/unittest/case.py
keep keep keep keep replace keep keep keep keep keep
 reverse takes request as a kwarg for compatibility with django's reverse 
djangorestframework/compat.py