mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 21:40:13 +03:00
Replaced "fields" with "raw_id_fields" in the "user" field in
authtoken/admin.py, so that the view doesn't timeout with databases that contain a considerable amount of users.
This commit is contained in:
parent
67ae6b2552
commit
1d0afc24f3
|
@ -4,7 +4,7 @@ from rest_framework.authtoken.models import Token
|
||||||
|
|
||||||
class TokenAdmin(admin.ModelAdmin):
|
class TokenAdmin(admin.ModelAdmin):
|
||||||
list_display = ('key', 'user', 'created')
|
list_display = ('key', 'user', 'created')
|
||||||
fields = ('user',)
|
raw_id_fields = ('user',)
|
||||||
ordering = ('-created',)
|
ordering = ('-created',)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user