Fixed #1583: django.contrib.admin.templatetags.admin_list no longer imports from the non-existant django.parts.media.photos. Thanks, ubernostrum

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2831 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2006-05-04 17:09:18 +00:00
parent 223a708278
commit 583dcdcede
1 changed files with 0 additions and 4 deletions

View File

@ -150,10 +150,6 @@ def items_for_result(cl, result):
elif isinstance(f, models.BooleanField) or isinstance(f, models.NullBooleanField):
BOOLEAN_MAPPING = {True: 'yes', False: 'no', None: 'unknown'}
result_repr = '<img src="%simg/admin/icon-%s.gif" alt="%s" />' % (settings.ADMIN_MEDIA_PREFIX, BOOLEAN_MAPPING[field_val], field_val)
# ImageFields are special: Use a thumbnail.
elif isinstance(f, models.ImageField):
from django.parts.media.photos import get_thumbnail_url
result_repr = '<img src="%s" alt="%s" title="%s" />' % (get_thumbnail_url(getattr(result, 'get_%s_url' % f.name)(), '120'), field_val, field_val)
# FloatFields are special: Zero-pad the decimals.
elif isinstance(f, models.FloatField):
if field_val is not None: