1
0
mirror of https://github.com/django/django.git synced 2025-10-28 08:06:09 +00:00

[1.8.x] Fixed #25299 -- Fixed crash with ModelAdmin.list_display value that clashes with a model reverse accessor.

Backport of 9607a04041 from master
This commit is contained in:
Tim Graham
2015-08-24 11:52:58 -04:00
parent 4f83bfa9e5
commit 3cc67a637a
4 changed files with 25 additions and 2 deletions

View File

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