  
  # Try to import six from Django, fallback to included `six`.
  try:
      from django.utils import six
  except:
      from rest_framework import six
  
  # location of patterns, url, include changes in 1.4 onwards
  try:
      from django.conf.urls import patterns, url, include
 
</s> remove except:
 </s> add except ImportError: </s> remove from django.core.exceptions import ObjectDoesNotExist, ValidationError
 </s> add from django.core.exceptions import ObjectDoesNotExist, ValidationError, NoReverseMatch </s> remove     except:  # Django 1.3
 </s> add     except ImportError:  # Django 1.3 </s> remove except:
 </s> add except ImportError:
except ImportError:
  
  # Try to import six from Django, fallback to included `six`.
  try:
      from django.utils import six
except ImportError:
      from rest_framework import six
  
  # location of patterns, url, include changes in 1.4 onwards
  try:
      from django.conf.urls import patterns, url, include
keep keep keep keep replace keep keep keep keep keep
 Purge naked excepts.

Most of these had obvious exceptions which would be thrown. Some I'm not
sure about but they should at least catch only Exception so as not to
ignore SystemExit and other inappropriate Error classes. 
rest_framework/compat.py