  
  from django.core.exceptions import ImproperlyConfigured, PermissionDenied
  from django.core.paginator import Paginator, InvalidPage
  from django.http import Http404
  from django.shortcuts import get_object_or_404
  from django.utils.translation import ugettext as _
  from rest_framework import views, mixins, exceptions
  from rest_framework.request import clone_request
  from rest_framework.settings import api_settings
  import warnings
 
</s>
from django.shortcuts import get_object_or_404 as _get_object_or_404
  
  from django.core.exceptions import ImproperlyConfigured, PermissionDenied
  from django.core.paginator import Paginator, InvalidPage
  from django.http import Http404
from django.shortcuts import get_object_or_404 as _get_object_or_404
  from django.utils.translation import ugettext as _
  from rest_framework import views, mixins, exceptions
  from rest_framework.request import clone_request
  from rest_framework.settings import api_settings
  import warnings
keep keep keep keep replace keep keep keep keep keep
 Raise 404 on incorrect lookup type in URL, not 500. Closes #890.
rest_framework/generics.py