We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 959085c commit 4842ad1Copy full SHA for 4842ad1
rest_framework/authtoken/admin.py
@@ -4,6 +4,7 @@
4
from django.contrib.auth import get_user_model
5
from django.core.exceptions import ValidationError
6
from django.urls import reverse
7
+from django.utils.translation import gettext_lazy as _
8
9
from rest_framework.authtoken.models import Token, TokenProxy
10
@@ -23,6 +24,8 @@ def url_for_result(self, result):
23
24
class TokenAdmin(admin.ModelAdmin):
25
list_display = ('key', 'user', 'created')
26
fields = ('user',)
27
+ search_fields = ('user__username',)
28
+ search_help_text = _('Username')
29
ordering = ('-created',)
30
actions = None # Actions not compatible with mapped IDs.
31
autocomplete_fields = ("user",)
0 commit comments