Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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
Jannis Leidel authored March 01, 2010

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  django/contrib/admin/options.py
6  django/contrib/admin/options.py
@@ -532,16 +532,16 @@ def construct_change_message(self, request, form, formsets):
532 532
             for formset in formsets:
533 533
                 for added_object in formset.new_objects:
534 534
                     change_message.append(_('Added %(name)s "%(object)s".')
535  
-                                          % {'name': added_object._meta.verbose_name,
  535
+                                          % {'name': force_unicode(added_object._meta.verbose_name),
536 536
                                              'object': force_unicode(added_object)})
537 537
                 for changed_object, changed_fields in formset.changed_objects:
538 538
                     change_message.append(_('Changed %(list)s for %(name)s "%(object)s".')
539 539
                                           % {'list': get_text_list(changed_fields, _('and')),
540  
-                                             'name': changed_object._meta.verbose_name,
  540
+                                             'name': force_unicode(changed_object._meta.verbose_name),
541 541
                                              'object': force_unicode(changed_object)})
542 542
                 for deleted_object in formset.deleted_objects:
543 543
                     change_message.append(_('Deleted %(name)s "%(object)s".')
544  
-                                          % {'name': deleted_object._meta.verbose_name,
  544
+                                          % {'name': force_unicode(deleted_object._meta.verbose_name),
545 545
                                              'object': force_unicode(deleted_object)})
546 546
         change_message = ' '.join(change_message)
547 547
         return change_message or _('No fields changed.')

0 notes on commit 4871b65

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