  
          try:
              page_num = int(self.request.GET.get('page', '1'))
          except ValueError:
              raise ErrorResponse(status.HTTP_404_NOT_FOUND,
                                  {'detail': 'That page contains no results'})
  
          if page_num not in paginator.page_range:
              raise ErrorResponse(status.HTTP_404_NOT_FOUND,
                                  {'detail': 'That page contains no results'})
  
 
</s> remove             raise ErrorResponse(status.HTTP_404_NOT_FOUND,
                                {'detail': 'That page contains no results'})
 </s> add             raise ErrorResponse(
                content={'detail': 'That page contains no results'},
                status=status.HTTP_404_NOT_FOUND) </s> remove             raise ErrorResponse(status.HTTP_404_NOT_FOUND, None, {})
 </s> add             raise ErrorResponse(status=status.HTTP_404_NOT_FOUND) </s> remove         except ErrorResponse, exc:
            self.assertEqual(exc.response.raw_content, {'field_errors': {'qwerty': ['This field is required.']}})
 </s> add         except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'field_errors': {'qwerty': ['This field is required.']}}) </s> remove             raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                {'detail': 'JSON parse error - %s' % unicode(exc)})
 </s> add             raise ErrorResponse(
                content={'detail': 'JSON parse error - %s' % unicode(exc)},
                status=status.HTTP_400_BAD_REQUEST) </s> remove                 raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                    {'detail': 'YAML parse error - %s' % unicode(exc)})
 </s> add                 raise ErrorResponse(
                    content={'detail': 'YAML parse error - %s' % unicode(exc)},
                    status=status.HTTP_400_BAD_REQUEST)
            raise ErrorResponse(
                content={'detail': 'That page contains no results'},
                status=status.HTTP_404_NOT_FOUND)
  
          try:
              page_num = int(self.request.GET.get('page', '1'))
          except ValueError:
            raise ErrorResponse(
                content={'detail': 'That page contains no results'},
                status=status.HTTP_404_NOT_FOUND)
            raise ErrorResponse(
                content={'detail': 'That page contains no results'},
                status=status.HTTP_404_NOT_FOUND)
  
          if page_num not in paginator.page_range:
              raise ErrorResponse(status.HTTP_404_NOT_FOUND,
                                  {'detail': 'That page contains no results'})
  
keep keep keep keep replace replace keep keep keep keep keep
 Response as a subclass of HttpResponse - first draft, not quite there yet. 
djangorestframework/mixins.py