  
  
  class Token(models.Model):
      """
      The default authorization token model.
      """
      key = models.CharField(max_length=40, primary_key=True)
      user = models.OneToOneField(AUTH_USER_MODEL, related_name='auth_token')
 
</s> remove # Django 1.5 add support for custom auth user model
if django.VERSION >= (1, 5):
    AUTH_USER_MODEL = settings.AUTH_USER_MODEL
else:
    AUTH_USER_MODEL = 'auth.User'


 </s> add  </s> remove from rest_framework.compat import AUTH_USER_MODEL
 </s> add 
# Prior to Django 1.5, the AUTH_USER_MODEL setting does not exist.
# Note that we don't perform this code in the compat module due to
# bug report #1297
# See: https://github.com/tomchristie/django-rest-framework/issues/1297
AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')


  
  
# Prior to Django 1.5, the AUTH_USER_MODEL setting does not exist.
# Note that we don't perform this code in the compat module due to
# bug report #1297
# See: https://github.com/tomchristie/django-rest-framework/issues/1297
AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')


  class Token(models.Model):
      """
      The default authorization token model.
      """
      key = models.CharField(max_length=40, primary_key=True)
      user = models.OneToOneField(AUTH_USER_MODEL, related_name='auth_token')
keep add keep keep keep keep keep keep
 Don't import compat.py from authtoken.models.  Closes #1297 
rest_framework/authtoken/models.py