Ticket #4266: admin_list_smart_str.diff
File admin_list_smart_str.diff, 951 bytes (added by , 18 years ago) |
---|
-
django/contrib/admin/templatetags/admin_list.py
7 7 from django.utils.html import escape 8 8 from django.utils.text import capfirst 9 9 from django.utils.translation import get_date_formats, get_partial_date_formats 10 from django.utils.encoding import smart_str 10 11 from django.template import Library 11 12 import datetime 12 13 … … 177 178 elif f.choices: 178 179 result_repr = dict(f.choices).get(field_val, EMPTY_CHANGELIST_VALUE) 179 180 else: 180 result_repr = escape(s tr(field_val))181 result_repr = escape(smart_str(field_val)) 181 182 if result_repr == '': 182 183 result_repr = ' ' 183 184 # If list_display_links not defined, add the link tag to the first field