Ticket #8153: modeladmin_options.diff
File modeladmin_options.diff, 1.6 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/options.py
358 358 359 359 pk_value = new_object._get_pk_val() 360 360 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)} 362 362 # Here, we distinguish between different save types by checking for 363 363 # the presence of keys in request.POST. 364 364 if request.POST.has_key("_continue"): … … 428 428 change_message = _('No fields changed.') 429 429 LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(self.model).id, pk_value, force_unicode(new_object), CHANGE, change_message) 430 430 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)} 432 432 if request.POST.has_key("_continue"): 433 433 request.user.message_set.create(message=msg + ' ' + _("You may edit it again below.")) 434 434 if request.REQUEST.has_key('_popup'):