From 9440f6ba41e5e96458cd7949fc6d605ef5bd09e9 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Wed, 26 Apr 2023 08:36:56 +0200 Subject: [PATCH] Fixed #34512 -- Restored breadcrumbs on admin app index view. Thanks Adam (ataylor32) for the report. Regression in 872b61193b013a700ff88cf50f0eb2cf2c266ff7. --- .../admin/templates/admin/app_index.html | 18 ++++++++++-------- docs/releases/4.2.1.txt | 3 +++ tests/admin_views/test_breadcrumbs.py | 4 ++++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/django/contrib/admin/templates/admin/app_index.html b/django/contrib/admin/templates/admin/app_index.html index 886bf6ca00..727f72b190 100644 --- a/django/contrib/admin/templates/admin/app_index.html +++ b/django/contrib/admin/templates/admin/app_index.html @@ -4,14 +4,16 @@ {% block bodyclass %}{{ block.super }} app-{{ app_label }}{% endblock %} {% if not is_popup %} -{% block breadcrumbs %} - +{% block nav-breadcrumbs %} + {% endblock %} {% endif %} diff --git a/docs/releases/4.2.1.txt b/docs/releases/4.2.1.txt index ffc9394dae..31747c1a23 100644 --- a/docs/releases/4.2.1.txt +++ b/docs/releases/4.2.1.txt @@ -44,3 +44,6 @@ Bugfixes * Fixed a regression in Django 4.2 that caused incorrect ``ClearableFileInput`` margins in the admin (:ticket:`34506`). + +* Fixed a regression in Django 4.2 where breadcrumbs didn't appear on admin + site app index views (:ticket:`34512`). diff --git a/tests/admin_views/test_breadcrumbs.py b/tests/admin_views/test_breadcrumbs.py index ee4285f9a9..87186e251c 100644 --- a/tests/admin_views/test_breadcrumbs.py +++ b/tests/admin_views/test_breadcrumbs.py @@ -23,3 +23,7 @@ class AdminBreadcrumbsTests(TestCase): def test_breadcrumbs_present(self): response = self.client.get(reverse("admin:auth_user_add")) self.assertContains(response, '