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