Skip to content

Add warning for outdated Django versions with link to latest stable r… #2103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/templates/docs/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@
{% trans "This document is for a preview release of Django, which can be significantly different from previous releases. For older releases, use the version selector floating in the bottom right corner of this page." %}
</div>
{% elif not release.is_supported %}
{% url 'document-detail' lang='en' version='stable' url=docurl host='docs' as latest_url %}
<div id="outdated-warning" class="doc-floating-warning">
{% trans "This document is for an insecure version of Django that is no longer supported. Please upgrade to a newer release!" %}
{% blocktrans with link='<a href="'|add:latest_url|add:'">here</a>'|safe %}
This document is for an insecure version of Django that is no longer supported. Please click {{ link }} for the latest version.
{% endblocktrans %}
</div>
{% endif %}
{% endblock body_extra %}
Expand Down