  from django.db.models.query import QuerySet
  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
  from rest_framework.settings import api_settings
  
 
</s> remove from django.db.models.query import QuerySet
 </s> add  </s> remove from django.utils import timezone
 </s> add from django.utils import six, timezone
from django.utils import six
  from django.db.models.query import QuerySet
  from django.http import Http404
  from django.shortcuts import get_object_or_404 as _get_object_or_404
from django.utils import six
  from django.utils.translation import ugettext as _
  from rest_framework import views, mixins
  from rest_framework.settings import api_settings
  
keep keep add keep keep keep keep
 Use six.text_type instead of str everywhere 
rest_framework/generics.py