Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.1.X] Fixed #12966 - Force unicode of verbose labels in admin chang…

…e messages.

Backport of r12627.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4871b654b59544ba99a6ab5b9c70f9c220d954fa 1 parent 1b2b3b0
@jezdez jezdez authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 django/contrib/admin/options.py
View
6 django/contrib/admin/options.py
@@ -532,16 +532,16 @@ def construct_change_message(self, request, form, formsets):
for formset in formsets:
for added_object in formset.new_objects:
change_message.append(_('Added %(name)s "%(object)s".')
- % {'name': added_object._meta.verbose_name,
+ % {'name': force_unicode(added_object._meta.verbose_name),
'object': force_unicode(added_object)})
for changed_object, changed_fields in formset.changed_objects:
change_message.append(_('Changed %(list)s for %(name)s "%(object)s".')
% {'list': get_text_list(changed_fields, _('and')),
- 'name': changed_object._meta.verbose_name,
+ 'name': force_unicode(changed_object._meta.verbose_name),
'object': force_unicode(changed_object)})
for deleted_object in formset.deleted_objects:
change_message.append(_('Deleted %(name)s "%(object)s".')
- % {'name': deleted_object._meta.verbose_name,
+ % {'name': force_unicode(deleted_object._meta.verbose_name),
'object': force_unicode(deleted_object)})
change_message = ' '.join(change_message)
return change_message or _('No fields changed.')
Please sign in to comment.
Something went wrong with that request. Please try again.