Ticket #11888: t11888_r11366.patch
File t11888_r11366.patch, 766 bytes (added by , 15 years ago) |
---|
-
django/contrib/admin/widgets.py
91 91 def render(self, name, value, attrs=None): 92 92 output = [] 93 93 if value and hasattr(value, "url"): 94 from django.utils.encoding import iri_to_uri 94 95 output.append('%s <a target="_blank" href="%s">%s</a> <br />%s ' % \ 95 (_('Currently:'), value.url, value, _('Change:')))96 (_('Currently:'), iri_to_uri(value.url), unicode(value), _('Change:'))) 96 97 output.append(super(AdminFileWidget, self).render(name, value, attrs)) 97 98 return mark_safe(u''.join(output)) 98 99