1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

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

This commit is contained in:
Tim Graham
2015-08-24 11:52:58 -04:00
parent 8e631a3175
commit 9607a04041
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):