Ticket #6750: 6750.diff

File 6750.diff, 829 bytes (added by Marc Garcia, 17 years ago)

Patch for the ticket (without a dictionary as string variables)

  • django/contrib/admin/widgets.py

     
    7272        from django.conf import settings
    7373        output = []
    7474        if value:
    75             output.append('%s <a target="_blank" href="%s%s">%s</a> <br />%s ' % \
    76                 (_('Currently:'), settings.MEDIA_URL, value, value, _('Change:')))
     75            output.append('%s <a href="%s%s" onclick="window.open(\'%s%s\'); return false">%s</a> <br />%s ' % \
     76                (_('Currently:'), settings.MEDIA_URL, value, settings.MEDIA_URL, value, value, _('Change:')))
    7777        output.append(super(AdminFileWidget, self).render(name, value, attrs))
    7878        return mark_safe(u''.join(output))
    7979
Back to Top