mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +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',)
|
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