From c087b7e8c169f009ff6113647685df4ea9fefe88 Mon Sep 17 00:00:00 2001 From: Natalia <124304+nessita@users.noreply.github.com> Date: Sun, 5 Jul 2026 19:41:15 -0300 Subject: [PATCH 1/3] Fixed #37204 -- Rendered console directives as plain code in epub docs builds. The console directive renders its Unix/Windows tabs with browser-only markup: hidden radio inputs toggled via CSS. The epub builder shares the HTML format, so it copied that markup into the ebook, where the tabs cannot work (e-readers do not support the driving CSS) and the raw HTML is not well-formed XHTML, so strict readers fail to parse the page. Skipped the tab markup for the epub builder and fell back to a plain literal block, matching what the non-HTML builders already do. --- docs/_ext/djangodocs.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py index 362911c55c96..ac7b161eeece 100644 --- a/docs/_ext/djangodocs.py +++ b/docs/_ext/djangodocs.py @@ -212,7 +212,14 @@ def depart_console_dummy(self, node): def visit_console_html(self, node): """Generate HTML for the console directive.""" - if self.builder.format == "html" and node["win_console_text"]: + # The epub builder uses the HTML format but produces XHTML for e-readers, + # where the CSS-driven tabs neither work nor validate as XML, so fall back + # to a plain literal block there (as the non-HTML formats already do). + if ( + self.builder.format == "html" + and self.builder.name != "epub" + and node["win_console_text"] + ): # Put a mark on the document object signaling the fact the directive # has been used on it. self.document._console_directive_used_flag = True From e26cdc556eabd8ea443401c38e8b2f9c7f7f046c Mon Sep 17 00:00:00 2001 From: FrickWu Date: Tue, 2 Jun 2026 20:41:40 -0400 Subject: [PATCH 2/3] Fixed #37122 -- Updated JSONField has_changed method to check for disabled status. --- django/forms/fields.py | 2 ++ tests/forms_tests/field_tests/test_jsonfield.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/django/forms/fields.py b/django/forms/fields.py index ab3f6876dfb4..ee8d87d92a65 100644 --- a/django/forms/fields.py +++ b/django/forms/fields.py @@ -1390,6 +1390,8 @@ def prepare_value(self, value): return json.dumps(value, ensure_ascii=False, cls=self.encoder) def has_changed(self, initial, data): + if self.disabled: + return False if super().has_changed(initial, data): return True # For purposes of seeing whether something has changed, True isn't the diff --git a/tests/forms_tests/field_tests/test_jsonfield.py b/tests/forms_tests/field_tests/test_jsonfield.py index be2b077e640b..3224c4fb101a 100644 --- a/tests/forms_tests/field_tests/test_jsonfield.py +++ b/tests/forms_tests/field_tests/test_jsonfield.py @@ -80,6 +80,10 @@ def test_has_changed(self): self.assertIs(field.has_changed({"a": True}, '{"a": 1}'), True) self.assertIs(field.has_changed({"a": 1, "b": 2}, '{"b": 2, "a": 1}'), False) + def test_disabled_has_changed(self): + field = JSONField(disabled=True) + self.assertIs(field.has_changed({"a": 1}, '{"a": 2}'), False) + def test_custom_encoder_decoder(self): class CustomDecoder(json.JSONDecoder): def __init__(self, object_hook=None, *args, **kwargs): From 6b13c8c4999f386b0eb22f311a5d3bbfd22d7be7 Mon Sep 17 00:00:00 2001 From: VIZZARD-X Date: Thu, 11 Jun 2026 22:25:10 +0530 Subject: [PATCH 3/3] Fixed #37158 -- Reordered the contribution checklist sections. --- .../writing-code/submitting-patches.txt | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/internals/contributing/writing-code/submitting-patches.txt b/docs/internals/contributing/writing-code/submitting-patches.txt index a038de53f7d3..845dda6ff9cc 100644 --- a/docs/internals/contributing/writing-code/submitting-patches.txt +++ b/docs/internals/contributing/writing-code/submitting-patches.txt @@ -465,6 +465,34 @@ of the `Django Development Dashboard `_. Looking to get your pull request reviewed? Ensure the Trac flags on the ticket are set so that the ticket appears in that queue. +All tickets +----------- + +* Is the pull request a single squashed commit with a message that follows our + :ref:`commit message format `? +* Are you the patch author and a new contributor? Please add yourself to the + :source:`AUTHORS` file. At your option, submit a + `Contributor License Agreement`_. +* Does this have an accepted ticket on Trac? All contributions require a ticket + unless the :ref:`change is considered trivial `. + +All code changes +---------------- + +* Does the :doc:`coding style + ` conform to our + guidelines? Are there any ``black``, ``blacken-docs``, ``flake8``, + ``isort``, or ``zizmor`` errors? You can install the :ref:`pre-commit + ` hooks to automatically catch these errors. +* If the change is backwards incompatible in any way, is there a note + in the release notes (``docs/releases/A.B.txt``)? +* Is Django's test suite passing? +* If there is a :ref:`code coverage report ` + comment on the pull request, have you reviewed the missing coverage in + context (considering database/platform-specific limitations)? +* If the change affects the Django admin or rendered HTML output, has + :ref:`accessibility testing ` been done? + Documentation ------------- @@ -498,32 +526,4 @@ Deprecating a feature See the :ref:`deprecating-a-feature` guide. -All code changes ----------------- - -* Does the :doc:`coding style - ` conform to our - guidelines? Are there any ``black``, ``blacken-docs``, ``flake8``, - ``isort``, or ``zizmor`` errors? You can install the :ref:`pre-commit - ` hooks to automatically catch these errors. -* If the change is backwards incompatible in any way, is there a note - in the release notes (``docs/releases/A.B.txt``)? -* Is Django's test suite passing? -* If there is a :ref:`code coverage report ` - comment on the pull request, have you reviewed the missing coverage in - context (considering database/platform-specific limitations)? -* If the change affects the Django admin or rendered HTML output, has - :ref:`accessibility testing ` been done? - -All tickets ------------ - -* Is the pull request a single squashed commit with a message that follows our - :ref:`commit message format `? -* Are you the patch author and a new contributor? Please add yourself to the - :source:`AUTHORS` file. At your option, submit a - `Contributor License Agreement`_. -* Does this have an accepted ticket on Trac? All contributions require a ticket - unless the :ref:`change is considered trivial `. - .. _Contributor License Agreement: https://www.djangoproject.com/foundation/cla/