mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-25 23:50:01 +03:00
Update authtoken admin to make "user" a raw_id_field
If you have a large number of users this page will attempt to load your entire User model dataset into a select box, which will likely time out / crash the admin site.
This commit is contained in:
parent
acf6582de4
commit
a7a68150f1
|
@ -22,6 +22,7 @@ class TokenChangeList(ChangeList):
|
|||
|
||||
class TokenAdmin(admin.ModelAdmin):
|
||||
list_display = ('key', 'user', 'created')
|
||||
raw_id_fields = ('user',)
|
||||
fields = ('user',)
|
||||
ordering = ('-created',)
|
||||
actions = None # Actions not compatible with mapped IDs.
|
||||
|
|
Loading…
Reference in New Issue
Block a user