Author: mtredinnick
Date: 2007-07-13 06:05:01 -0500 (Fri, 13 Jul 2007)
New Revision: 5683

Modified:
   django/trunk/django/contrib/admin/views/main.py
Log:
Fixed #4846 -- Fixed some Python 2.3 encoding problems in the admin interface.
Based on a patch from [EMAIL PROTECTED]


Modified: django/trunk/django/contrib/admin/views/main.py
===================================================================
--- django/trunk/django/contrib/admin/views/main.py     2007-07-13 10:56:30 UTC 
(rev 5682)
+++ django/trunk/django/contrib/admin/views/main.py     2007-07-13 11:05:01 UTC 
(rev 5683)
@@ -261,7 +261,7 @@
             new_object = manipulator.save(new_data)
             pk_value = new_object._get_pk_val()
             LogEntry.objects.log_action(request.user.id, 
ContentType.objects.get_for_model(model).id, pk_value, 
force_unicode(new_object), ADDITION)
-            msg = _('The %(name)s "%(obj)s" was added successfully.') % 
{'name': force_unicode(opts.verbose_name), 'obj': new_object}
+            msg = _('The %(name)s "%(obj)s" was added successfully.') % 
{'name': force_unicode(opts.verbose_name), 'obj': force_unicode(new_object)}
             # Here, we distinguish between different save types by checking for
             # the presence of keys in request.POST.
             if "_continue" in request.POST:
@@ -349,7 +349,7 @@
                 change_message = _('No fields changed.')
             LogEntry.objects.log_action(request.user.id, 
ContentType.objects.get_for_model(model).id, pk_value, 
force_unicode(new_object), CHANGE, change_message)
 
-            msg = _('The %(name)s "%(obj)s" was changed successfully.') % 
{'name': force_unicode(opts.verbose_name), 'obj': new_object}
+            msg = _('The %(name)s "%(obj)s" was changed successfully.') % 
{'name': force_unicode(opts.verbose_name), 'obj': force_unicode(new_object)}
             if "_continue" in request.POST:
                 request.user.message_set.create(message=msg + ' ' + _("You may 
edit it again below."))
                 if '_popup' in request.REQUEST:
@@ -357,7 +357,7 @@
                 else:
                     return HttpResponseRedirect(request.path)
             elif "_saveasnew" in request.POST:
-                request.user.message_set.create(message=_('The %(name)s 
"%(obj)s" was added successfully. You may edit it again below.') % {'name': 
force_unicode(opts.verbose_name), 'obj': new_object})
+                request.user.message_set.create(message=_('The %(name)s 
"%(obj)s" was added successfully. You may edit it again below.') % {'name': 
force_unicode(opts.verbose_name), 'obj': force_unicode(new_object)})
                 return HttpResponseRedirect("../%s/" % pk_value)
             elif "_addanother" in request.POST:
                 request.user.message_set.create(message=msg + ' ' + (_("You 
may add another %s below.") % force_unicode(opts.verbose_name)))


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to