Ticket #1583: admin_list.diff
File admin_list.diff, 1.1 KB (added by , 19 years ago) |
---|
-
admin_list.py
150 150 elif isinstance(f, models.BooleanField) or isinstance(f, models.NullBooleanField): 151 151 BOOLEAN_MAPPING = {True: 'yes', False: 'no', None: 'unknown'} 152 152 result_repr = '<img src="%simg/admin/icon-%s.gif" alt="%s" />' % (settings.ADMIN_MEDIA_PREFIX, BOOLEAN_MAPPING[field_val], field_val) 153 # ImageFields are special: Use a thumbnail.153 # ImageFields are special: Use the path to the image file. 154 154 elif isinstance(f, models.ImageField): 155 from django.parts.media.photos import get_thumbnail_url 156 result_repr = '<img src="%s" alt="%s" title="%s" />' % (get_thumbnail_url(getattr(result, 'get_%s_url' % f.name)(), '120'), field_val, field_val) 155 result_repr = '%s' % f.path 157 156 # FloatFields are special: Zero-pad the decimals. 158 157 elif isinstance(f, models.FloatField): 159 158 if field_val is not None: