From 3cc67a637a3cd1426d2ac87d7418600fa247ebb2 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 24 Aug 2015 11:52:58 -0400 Subject: [1.8.x] Fixed #25299 -- Fixed crash with ModelAdmin.list_display value that clashes with a model reverse accessor. Backport of 9607a0404188bbe612f05216f5a82df26f4b4e80 from master --- tests/admin_views/admin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/admin_views/admin.py') diff --git a/tests/admin_views/admin.py b/tests/admin_views/admin.py index 158f42ea67..b4e67f0a23 100644 --- a/tests/admin_views/admin.py +++ b/tests/admin_views/admin.py @@ -169,7 +169,11 @@ class ThingAdmin(admin.ModelAdmin): class InquisitionAdmin(admin.ModelAdmin): - list_display = ('leader', 'country', 'expected') + list_display = ('leader', 'country', 'expected', 'sketch') + + def sketch(self, obj): + # A method with the same name as a reverse accessor. + return 'list-display-sketch' class SketchAdmin(admin.ModelAdmin): -- cgit v1.3