[Django] #37150: Version added/changed text, console tabs missing from RTD preview builds, dirhtml builds, etc.

0 views
Skip to first unread message

Django

unread,
Jun 8, 2026, 4:42:56 PM (19 hours ago) Jun 8
to django-...@googlegroups.com
#37150: Version added/changed text, console tabs missing from RTD preview builds,
dirhtml builds, etc.
-------------------------------------+-------------------------------------
Reporter: Mike | Owner: Mike Edmunds
Edmunds |
Type: | Status: assigned
Cleanup/optimization |
Component: | Version: 6.0
Documentation |
Severity: Normal | Keywords: sphinx
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
There are several related issues in the `docs._ext.djangodocs` Sphinx
extension. The symptom is missing content in most html-like Sphinx builds,
including ReadTheDocs PR preview builds:

- Missing text for `versionadded` and `versionchanged` directives: the
html contains an empty `<div>` where something like "New in Django 6.1" or
"Changed in Django development version" should be.
- Missing console tabs: the html does not include Windows console examples
when they are available.

This affects the html builder (which RTD uses by default), the dirhtml
builder, plus htmlhelp and singlehtml.

The fix is for the djangodocs extension to:
- Register `DjangoHTMLTranslator` for all html-like builders (solves
missing version text)
- Handle all HTML-like builders in `visit_console_html()` and
`ConsoleDirective.run()` (solves missing console tabs)

[Currently, the extension only handles version and console directives for
a custom "djangohtml" builder—used in the docs/Makefile "html" target—and
the "json" builder which is used for the docs.djangoproject.com site.]

Also, the custom `DjangoStandaloneHTMLBuilder` class can and should be
removed. Its only function is generating `templatebuiltins.js`, which is
meant to enable client-side hyperlinking of template tags and filters in
code examples. But that feature isn't enabled on docs.djangoproject.com
and has been broken in local docs builds since Sphinx 6.0 removed jQuery
in 2023. It's effectively dead code.
--
Ticket URL: <https://code.djangoproject.com/ticket/37150>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 8, 2026, 5:56:05 PM (18 hours ago) Jun 8
to django-...@googlegroups.com
#37150: Version added/changed text, console tabs missing from RTD preview builds,
dirhtml builds, etc.
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: Mike
Type: | Edmunds
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: sphinx | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mike Edmunds):

* has_patch: 0 => 1

Comment:

https://github.com/django/django/pull/21440.

[The djangodocs Sphinx extension and theme template files are
undocumented, so I think deprecation would not apply to the removed code.]
--
Ticket URL: <https://code.djangoproject.com/ticket/37150#comment:1>
Reply all
Reply to author
Forward
0 new messages