code: def get_object_or_404(queryset, *filter_args, **filter_kwargs):
      
      try:
          return _get_object_or_404(queryset, *filter_args, **filter_kwargs)
      except (TypeError, ValueError, ValidationError):
          raise Http404
docs: Same as Django's standard shortcut, but make sure to also raise 404
      if the filter_kwargs don't match the required types.
  
      This function was copied from rest_framework.generics because of issue #36.