diff --git a/django/contrib/admin/templatetags/base.py b/django/contrib/admin/templatetags/base.py index 23e4cfbe8683..9551c0e71df8 100644 --- a/django/contrib/admin/templatetags/base.py +++ b/django/contrib/admin/templatetags/base.py @@ -32,7 +32,7 @@ def __init__(self, parser, token, func, template_name, takes_context=True): def render(self, context): opts = context["opts"] app_label = opts.app_label.lower() - object_name = opts.object_name.lower() + object_name = opts.model_name # Load template for this render call. (Setting self.filename isn't # thread-safe.) context.render_context[self] = context.template.engine.select_template( diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index fc0cd941d12c..3352e75e79e9 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -202,7 +202,7 @@ def label_and_url_for_value(self, value): % ( self.admin_site.name, obj._meta.app_label, - obj._meta.object_name.lower(), + obj._meta.model_name, ), args=(obj.pk,), )