fix: Render Django 6.1 breadcrumb markup on the alias usage page - #396
Merged
Conversation
Django 6.1 changed the admin breadcrumbs from `<div class="breadcrumbs">`
to `<ol class="breadcrumbs">` with one `<li>` per crumb, and its selectors
in `admin/css/base.css` are element-qualified. The `{% block breadcrumbs %}`
override in `alias_usage.html` still emitted the old markup, so the
breadcrumbs matched no rule at all and rendered unstyled.
The block now switches on the Django version through a new
`{% django_version_gte %}` template tag: on 6.1+ it emits the list markup
with `aria-current="page"` on the last crumb and without the literal
`›` separators (6.1 generates them from `li::after`), and keeps the
old markup on 5.2/6.0.
Fixes #395
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
Contributor
Reviewer's GuideThe PR fixes alias usage breadcrumbs across Django versions by adding a reusable version-checking template tag and conditionally rendering the Django 6.1+ ordered-list breadcrumb structure versus the legacy markup, with tests covering both version logic and generated HTML. Flow diagram for version-aware alias usage breadcrumbsflowchart TD
A[Alias usage page renders breadcrumbs] --> B[django_version_gte 6 1]
B -->|true| C[Render ol.breadcrumbs with li items]
B -->|false| D[Render div.breadcrumbs with separators]
C --> E[Display Usage of alias]
D --> E
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Django main requires `asgiref>=3.12.1`, but the djmain lock files still
pinned 3.9.1 / 3.10.0, so `unit-tests-dev` failed to install before it
ever ran a test:
The conflict is caused by:
The user requested asgiref==3.9.1
django 6.2 depends on asgiref>=3.12.1
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
Django 6.1 is released and is what #395 is about, but nothing in the matrix ran against it - the 6.1 code paths were only exercised by the `unit-tests-dev` jobs, whose test step is `continue-on-error`. Adds a `dj61` environment for Python 3.12-3.14 (Django 6.1 needs 3.12+), the matching lock files, and the trove classifier. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
fsbraun
added a commit
that referenced
this pull request
Aug 27, 2026
#396 and #397 landed upstream in the meantime; #396 was merged before the matrix was trimmed. Resolved every conflict under tests/requirements/, tox.ini and compile.py in favour of this branch, so the trimmed matrix stands: django CMS 5.0 only at py311-dj52 and py314-dj61, django CMS 5.1 across the full Python/Django matrix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Support Django 6.1 breadcrumb styling on the alias usage page while maintaining compatibility with earlier Django releases.
Bug Fixes:
Enhancements:
Build:
CI:
Tests:
Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
Related resources
Checklist