Update admin.py (#8534)

Use `autocomplete_fields` to keep the select user field manageable.
This commit is contained in:
Tom Christie 2022-12-02 05:40:15 +00:00 committed by GitHub
parent 614bd87b60
commit a02bb79d87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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