diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-08 20:59:02 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-08 20:59:02 +0000 |
| commit | 7899568e01fc9c68afe995fa71de915dd9fcdd76 (patch) | |
| tree | 35f1e999a9a48fe24790f00c2335e558a53fc718 /django/contrib/admin/widgets.py | |
| parent | c49eac7d4f64c374d19aa81f2c813a4b20e4cad7 (diff) | |
File storage refactoring, adding far more flexibility to Django's file handling. The new files.txt document has details of the new features.
This is a backwards-incompatible change; consult BackwardsIncompatibleChanges for details.
Fixes #3567, #3621, #4345, #5361, #5655, #7415.
Many thanks to Marty Alchin who did the vast majority of this work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/admin/widgets.py')
| -rw-r--r-- | django/contrib/admin/widgets.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index 884171be2e..02a52702d3 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -85,8 +85,8 @@ class AdminFileWidget(forms.FileInput): def render(self, name, value, attrs=None): output = [] if value: - output.append('%s <a target="_blank" href="%s%s">%s</a> <br />%s ' % \ - (_('Currently:'), settings.MEDIA_URL, value, value, _('Change:'))) + output.append('%s <a target="_blank" href="%s">%s</a> <br />%s ' % \ + (_('Currently:'), value.url, value, _('Change:'))) output.append(super(AdminFileWidget, self).render(name, value, attrs)) return mark_safe(u''.join(output)) |
