Post date: Dec 23, 2011 8:29:10 AM
There is example where in change list I want to display coutry and city for example but do not show links to edit it.
This will not work:
class GeoAdmin(admin.ModelAdmin):
list_display = ('country', 'city',)
list_display_links = []
because there is check on empty list in django.
And this will work:
class GeoAdmin(admin.ModelAdmin):
list_display = ('country', 'city',)
def __init__(self, *args, **kwargs):
super(GeoAdmin, self).__init__(*args, **kwargs)
self.list_display_links = (None,)