Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #12966 - Force unicode of verbose labels in admin change messages.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12627 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e889b69dd2028be4010dcad5688809c03ff4e2e2 1 parent 2dafe4a
Jannis Leidel authored

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
@@ -561,16 +561,16 @@ def construct_change_message(self, request, form, formsets):
561 561
             for formset in formsets:
562 562
                 for added_object in formset.new_objects:
563 563
                     change_message.append(_('Added %(name)s "%(object)s".')
564  
-                                          % {'name': added_object._meta.verbose_name,
  564
+                                          % {'name': force_unicode(added_object._meta.verbose_name),
565 565
                                              'object': force_unicode(added_object)})
566 566
                 for changed_object, changed_fields in formset.changed_objects:
567 567
                     change_message.append(_('Changed %(list)s for %(name)s "%(object)s".')
568 568
                                           % {'list': get_text_list(changed_fields, _('and')),
569  
-                                             'name': changed_object._meta.verbose_name,
  569
+                                             'name': force_unicode(changed_object._meta.verbose_name),
570 570
                                              'object': force_unicode(changed_object)})
571 571
                 for deleted_object in formset.deleted_objects:
572 572
                     change_message.append(_('Deleted %(name)s "%(object)s".')
573  
-                                          % {'name': deleted_object._meta.verbose_name,
  573
+                                          % {'name': force_unicode(deleted_object._meta.verbose_name),
574 574
                                              'object': force_unicode(deleted_object)})
575 575
         change_message = ' '.join(change_message)
576 576
         return change_message or _('No fields changed.')

0 notes on commit e889b69

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