diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
a
|
b
|
|
748 | 748 | Determines the HttpResponse for the change_view stage. |
749 | 749 | """ |
750 | 750 | opts = obj._meta |
| 751 | |
| 752 | # handle proxy models automatically created by .only() or .defer() |
| 753 | verbose_name = opts.verbose_name |
| 754 | if obj._deferred: |
| 755 | opts_ = opts.proxy_for_model._meta |
| 756 | verbose_name = opts_.verbose_name |
| 757 | |
751 | 758 | pk_value = obj._get_pk_val() |
752 | 759 | |
753 | | msg = _('The %(name)s "%(obj)s" was changed successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(obj)} |
| 760 | msg = _('The %(name)s "%(obj)s" was changed successfully.') % {'name': force_unicode(verbose_name), 'obj': force_unicode(obj)} |
754 | 761 | if "_continue" in request.POST: |
755 | 762 | self.message_user(request, msg + ' ' + _("You may edit it again below.")) |
756 | 763 | if "_popup" in request.REQUEST: |
… |
… |
|
762 | 769 | self.message_user(request, msg) |
763 | 770 | return HttpResponseRedirect("../%s/" % pk_value) |
764 | 771 | elif "_addanother" in request.POST: |
765 | | self.message_user(request, msg + ' ' + (_("You may add another %s below.") % force_unicode(opts.verbose_name))) |
| 772 | self.message_user(request, msg + ' ' + (_("You may add another %s below.") % force_unicode(verbose_name))) |
766 | 773 | return HttpResponseRedirect("../add/") |
767 | 774 | else: |
768 | 775 | self.message_user(request, msg) |