Ticket #9654: respect-empty-list_display_links.diff
File respect-empty-list_display_links.diff, 1.9 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/validation.py
42 42 % (cls.__name__, idx, field)) 43 43 44 44 # list_display_links 45 if hasattr(cls, 'list_display_links') :45 if hasattr(cls, 'list_display_links') and cls.list_display_links is not None: 46 46 check_isseq(cls, 'list_display_links', cls.list_display_links) 47 47 for idx, field in enumerate(cls.list_display_links): 48 48 fetch_attr(cls, model, opts, 'list_display_links[%d]' % idx, field) -
django/contrib/admin/options.py
156 156 __metaclass__ = forms.MediaDefiningClass 157 157 158 158 list_display = ('__str__',) 159 list_display_links = ()159 list_display_links = None 160 160 list_filter = () 161 161 list_select_related = False 162 162 list_per_page = 100 -
django/contrib/admin/templatetags/admin_list.py
212 212 if force_unicode(result_repr) == '': 213 213 result_repr = mark_safe(' ') 214 214 # If list_display_links not defined, add the link tag to the first field 215 if (first and not cl.list_display_links) or field_name in cl.list_display_links:215 if (first and cl.list_display_links is None) or (cl.list_display_links and field_name in cl.list_display_links): 216 216 table_tag = {True:'th', False:'td'}[first] 217 217 first = False 218 218 url = cl.url_for_result(result)