  from django.middleware.csrf import CsrfViewMiddleware
  from django.utils.translation import ugettext_lazy as _
  
  from rest_framework import HTTP_HEADER_ENCODING, exceptions
  from rest_framework.authtoken.models import Token
  
  
  def get_authorization_header(request):
      """
      Return request's 'Authorization:' header, as a bytestring.
 
</s> remove             token = self.model.objects.select_related('user').get(key=key)
 </s> add             token = self.get_model().objects.select_related('user').get(key=key) </s> remove     class Meta:
        # Work around for a bug in Django:
        # https://code.djangoproject.com/ticket/19422
        #
        # Also see corresponding ticket:
        # https://github.com/tomchristie/django-rest-framework/issues/705
        abstract = 'rest_framework.authtoken' not in settings.INSTALLED_APPS

 </s> add  </s> remove     model = Token
 </s> add     model = None

    def get_model(self):
        if self.model is not None:
            return self.model
        from rest_framework.authtoken.models import Token
        return Token

  from django.middleware.csrf import CsrfViewMiddleware
  from django.utils.translation import ugettext_lazy as _
  
  from rest_framework import HTTP_HEADER_ENCODING, exceptions

  
  
  def get_authorization_header(request):
      """
      Return request's 'Authorization:' header, as a bytestring.
keep keep keep keep replace keep keep keep keep keep
 don't import authtoken model until needed 
rest_framework/authentication.py