diff --git a/django/contrib/admin/util.py b/django/contrib/admin/util.py
index e98ec7b..174abb2 100644
a
|
b
|
def display_for_field(value, field):
|
291 | 291 | return formats.number_format(value, field.decimal_places) |
292 | 292 | elif isinstance(field, models.FloatField): |
293 | 293 | return formats.number_format(value) |
| 294 | elif isinstance(field, models.FileField): |
| 295 | try: |
| 296 | # Causes a ValueError if file is empty. |
| 297 | value.file |
| 298 | return mark_safe(u'<a href="%s">%s</a>' |
| 299 | % (escape(value.url), |
| 300 | escape(force_unicode(value)))) |
| 301 | except ValueError: |
| 302 | return EMPTY_CHANGELIST_VALUE |
294 | 303 | else: |
295 | 304 | return smart_unicode(value) |
296 | 305 | |