From 1d0afc24f33cbdc7728406c34169afea5d18a0b7 Mon Sep 17 00:00:00 2001 From: Ricardo Grizonic Date: Mon, 26 Jan 2015 12:11:39 +0100 Subject: [PATCH] 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. --- rest_framework/authtoken/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/authtoken/admin.py b/rest_framework/authtoken/admin.py index ec28eb1ca..8ec1cf227 100644 --- a/rest_framework/authtoken/admin.py +++ b/rest_framework/authtoken/admin.py @@ -4,7 +4,7 @@ from rest_framework.authtoken.models import Token class TokenAdmin(admin.ModelAdmin): list_display = ('key', 'user', 'created') - fields = ('user',) + raw_id_fields = ('user',) ordering = ('-created',)