Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

newforms-admin: Fixed #5695. AdminFileWidget now properly marks strin…

…gs for translation and a minor XHTML fix.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent ac4f5ef commit 9d4db678f4f979e5bc1ae0a1cd3e4e86b72760e7 @brosner brosner committed
2  django/contrib/admin/tests/
@@ -28,7 +28,7 @@
>>> w = AdminFileWidget()
>>> print conditional_escape(w.render('test', 'test'))
-Currently: <a target="_blank" href="%(MEDIA_URL)stest">test</a> <br>Change: <input type="file" name="test" />
+Currently: <a target="_blank" href="%(MEDIA_URL)stest">test</a> <br />Change: <input type="file" name="test" />
To test ForeignKeyRawIdWidget a user object must be created. Its pk is
explicitly set to 100 to avoid having to potentially overmatch in the test.
3  django/contrib/admin/
@@ -72,7 +72,8 @@ def render(self, name, value, attrs=None):
from django.conf import settings
output = []
if value:
- output.append('Currently: <a target="_blank" href="%s%s">%s</a> <br>Change: ' % (settings.MEDIA_URL, value, value))
+ output.append('%s <a target="_blank" href="%s%s">%s</a> <br />%s ' % \
+ (_('Currently:'), settings.MEDIA_URL, value, value, _('Change:')))
output.append(super(AdminFileWidget, self).render(name, value, attrs))
return mark_safe(u''.join(output))

0 comments on commit 9d4db67

Please sign in to comment.
Something went wrong with that request. Please try again.