Ticket #766: admin_list.patch
File admin_list.patch, 914 bytes (added by , 19 years ago) |
---|
-
django/contrib/admin/templatetags/admin_list.py
156 156 # For non-field list_display values, the value is a method 157 157 # name. Execute the method. 158 158 try: 159 result_repr = strip_tags(str(getattr(result, field_name)())) 159 func = getattr(result, field_name) 160 try: 161 if func.allow_tags: 162 result_repr = str(func()) 163 else: 164 raise AttributeError 165 except AttributeError: 166 result_repr = strip_tags(str(func())) 160 167 except ObjectDoesNotExist: 161 168 result_repr = EMPTY_CHANGELIST_VALUE 162 169 else: