  from django.contrib import admin
  
  from rest_framework.authtoken.models import Token, TokenProxy
  
  User = get_user_model()
  
 
</s> remove from rest_framework.authtoken.models import Token
 </s> add from rest_framework.authtoken.models import Token, TokenProxy

User = get_user_model()


class TokenChangeList(ChangeList):
    """Map to matching User id"""
    def url_for_result(self, result):
        pk = result.user.pk
        return reverse('admin:%s_%s_change' % (self.opts.app_label,
                                               self.opts.model_name),
                       args=(quote(pk),),
                       current_app=self.model_admin.admin_site.name) </s> remove @admin.register(Token)
 </s> add 
from django.contrib.admin.utils import quote
from django.contrib.admin.views.main import ChangeList
from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from django.urls import reverse
  from django.contrib import admin
from django.contrib.admin.utils import quote
from django.contrib.admin.views.main import ChangeList
from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from django.urls import reverse
  
  from rest_framework.authtoken.models import Token, TokenProxy
  
  User = get_user_model()
  
add keep keep keep keep keep
 Adjusted token admin to map to user ID. (#7341)

Closes #6131.

* Adds a proxy model for Token that uses the user.pk, rather than it's own.
* Adjusts Admin to map back from User ID to token instance. 
rest_framework/authtoken/admin.py