Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fffbf85

Browse filesBrowse files
committed
[4.2.x] Fixed #34512 -- Restored breadcrumbs on admin app index view.
Thanks Adam (ataylor32) for the report. Regression in 872b611. Backport of 9440f6b from main
1 parent 9ab8067 commit fffbf85
Copy full SHA for fffbf85

File tree

3 files changed

+17
-8
lines changed
Filter options

3 files changed

+17
-8
lines changed

‎django/contrib/admin/templates/admin/app_index.html

Copy file name to clipboardExpand all lines: django/contrib/admin/templates/admin/app_index.html
+10-8Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
{% block bodyclass %}{{ block.super }} app-{{ app_label }}{% endblock %}
55

66
{% if not is_popup %}
7-
{% block breadcrumbs %}
8-
<div class="breadcrumbs">
9-
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
10-
&rsaquo;
11-
{% for app in app_list %}
12-
{{ app.name }}
13-
{% endfor %}
14-
</div>
7+
{% block nav-breadcrumbs %}
8+
<nav aria-label="{% translate 'Breadcrumbs' %}">
9+
<div class="breadcrumbs">
10+
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
11+
&rsaquo;
12+
{% for app in app_list %}
13+
{{ app.name }}
14+
{% endfor %}
15+
</div>
16+
</nav>
1517
{% endblock %}
1618
{% endif %}
1719

‎docs/releases/4.2.1.txt

Copy file name to clipboardExpand all lines: docs/releases/4.2.1.txt
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ Bugfixes
4444

4545
* Fixed a regression in Django 4.2 that caused incorrect ``ClearableFileInput``
4646
margins in the admin (:ticket:`34506`).
47+
48+
* Fixed a regression in Django 4.2 where breadcrumbs didn't appear on admin
49+
site app index views (:ticket:`34512`).

‎tests/admin_views/test_breadcrumbs.py

Copy file name to clipboardExpand all lines: tests/admin_views/test_breadcrumbs.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ def test_breadcrumbs_absent(self):
2323
def test_breadcrumbs_present(self):
2424
response = self.client.get(reverse("admin:auth_user_add"))
2525
self.assertContains(response, '<nav aria-label="Breadcrumbs">')
26+
response = self.client.get(
27+
reverse("admin:app_list", kwargs={"app_label": "auth"})
28+
)
29+
self.assertContains(response, '<nav aria-label="Breadcrumbs">')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.