Ticket #8153: modeladmin_options.diff

File modeladmin_options.diff, 1.6 KB (added by Nils Fredrik Gjerull, 16 years ago)
  • django/contrib/admin/options.py

     
    358358
    359359        pk_value = new_object._get_pk_val()
    360360        LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(self.model).id, pk_value, force_unicode(new_object), ADDITION)
    361         msg = _('The %(name)s "%(obj)s" was added successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': new_object}
     361        msg = _('The %(name)s "%(obj)s" was added successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(new_object)}
    362362        # Here, we distinguish between different save types by checking for
    363363        # the presence of keys in request.POST.
    364364        if request.POST.has_key("_continue"):
     
    428428            change_message = _('No fields changed.')
    429429        LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(self.model).id, pk_value, force_unicode(new_object), CHANGE, change_message)
    430430
    431         msg = _('The %(name)s "%(obj)s" was changed successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': new_object}
     431        msg = _('The %(name)s "%(obj)s" was changed successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(new_object)}
    432432        if request.POST.has_key("_continue"):
    433433            request.user.message_set.create(message=msg + ' ' + _("You may edit it again below."))
    434434            if request.REQUEST.has_key('_popup'):
Back to Top