mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 00:19:53 +03:00
Update admin.py
Use `autocomplete_fields` to keep the select user field manageable.
This commit is contained in:
parent
9f07d9edeb
commit
2206f7c1dd
|
@ -25,6 +25,7 @@ class TokenAdmin(admin.ModelAdmin):
|
||||||
fields = ('user',)
|
fields = ('user',)
|
||||||
ordering = ('-created',)
|
ordering = ('-created',)
|
||||||
actions = None # Actions not compatible with mapped IDs.
|
actions = None # Actions not compatible with mapped IDs.
|
||||||
|
autocomplete_fields = ("user",)
|
||||||
|
|
||||||
def get_changelist(self, request, **kwargs):
|
def get_changelist(self, request, **kwargs):
|
||||||
return TokenChangeList
|
return TokenChangeList
|
||||||
|
|
Loading…
Reference in New Issue
Block a user