Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #4846 -- Fixed some Python 2.3 encoding problems in the admin i…

…nterface.

Based on a patch from daybreaker12@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0145e71cebccb4729e00a31b04db5591614d04d0 1 parent e27a7ef
Malcolm Tredinnick authored July 13, 2007

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

  1. 6  django/contrib/admin/views/main.py
6  django/contrib/admin/views/main.py
@@ -261,7 +261,7 @@ def add_stage(request, app_label, model_name, show_delete=False, form_url='', po
261 261
             new_object = manipulator.save(new_data)
262 262
             pk_value = new_object._get_pk_val()
263 263
             LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(model).id, pk_value, force_unicode(new_object), ADDITION)
264  
-            msg = _('The %(name)s "%(obj)s" was added successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': new_object}
  264
+            msg = _('The %(name)s "%(obj)s" was added successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(new_object)}
265 265
             # Here, we distinguish between different save types by checking for
266 266
             # the presence of keys in request.POST.
267 267
             if "_continue" in request.POST:
@@ -349,7 +349,7 @@ def change_stage(request, app_label, model_name, object_id):
349 349
                 change_message = _('No fields changed.')
350 350
             LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(model).id, pk_value, force_unicode(new_object), CHANGE, change_message)
351 351
 
352  
-            msg = _('The %(name)s "%(obj)s" was changed successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': new_object}
  352
+            msg = _('The %(name)s "%(obj)s" was changed successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(new_object)}
353 353
             if "_continue" in request.POST:
354 354
                 request.user.message_set.create(message=msg + ' ' + _("You may edit it again below."))
355 355
                 if '_popup' in request.REQUEST:
@@ -357,7 +357,7 @@ def change_stage(request, app_label, model_name, object_id):
357 357
                 else:
358 358
                     return HttpResponseRedirect(request.path)
359 359
             elif "_saveasnew" in request.POST:
360  
-                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})
  360
+                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)})
361 361
                 return HttpResponseRedirect("../%s/" % pk_value)
362 362
             elif "_addanother" in request.POST:
363 363
                 request.user.message_set.create(message=msg + ' ' + (_("You may add another %s below.") % force_unicode(opts.verbose_name)))

0 notes on commit 0145e71

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