From 659a77cf1d8fd7b35e82e1cd830b32360d189ba4 Mon Sep 17 00:00:00 2001 From: Natalia <124304+nessita@users.noreply.github.com> Date: Fri, 17 Jul 2026 12:04:09 -0300 Subject: [PATCH 1/3] Unified dependency apt installation in GitHub Action workflows. --- .github/workflows/coverage_tests.yml | 8 ++++---- .github/workflows/data/apt-packages.txt | 1 + .github/workflows/docs.yml | 2 +- .github/workflows/postgis.yml | 6 ++++-- .github/workflows/python_matrix.yml | 6 ++++-- .github/workflows/schedule_tests.yml | 24 ++++++++++++++++-------- .github/workflows/screenshots.yml | 8 ++++---- .github/workflows/selenium.yml | 12 ++++++++---- 8 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/data/apt-packages.txt diff --git a/.github/workflows/coverage_tests.yml b/.github/workflows/coverage_tests.yml index 43d15b510ddc..4ac6751e5da8 100644 --- a/.github/workflows/coverage_tests.yml +++ b/.github/workflows/coverage_tests.yml @@ -47,10 +47,10 @@ jobs: cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - - name: Update apt repo - run: sudo apt update - - name: Install libmemcached-dev for pylibmc - run: sudo apt install -y libmemcached-dev + - name: Install system packages + run: | + sudo apt update + xargs -a .github/workflows/data/apt-packages.txt sudo apt install -y --no-install-recommends - name: Install dependencies run: | python -m pip install --upgrade pip wheel diff --git a/.github/workflows/data/apt-packages.txt b/.github/workflows/data/apt-packages.txt new file mode 100644 index 000000000000..907cbe18ac3b --- /dev/null +++ b/.github/workflows/data/apt-packages.txt @@ -0,0 +1 @@ +libmemcached-dev diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a993fdca605d..7947520807c6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,7 +38,7 @@ jobs: cache: 'pip' cache-dependency-path: 'docs/requirements.txt' - name: Install system spell checker - run: sudo apt update && sudo apt install -y aspell aspell-en + run: sudo apt update && sudo apt install -y --no-install-recommends aspell aspell-en - run: python -m pip install -r requirements.txt - name: Lint run: make lint diff --git a/.github/workflows/postgis.yml b/.github/workflows/postgis.yml index 7fb6d219f97a..9b821b6aa57c 100644 --- a/.github/workflows/postgis.yml +++ b/.github/workflows/postgis.yml @@ -42,8 +42,10 @@ jobs: activate-environment: geodjango environment-file: ${{ matrix.conda-environment-file }} channel-priority: strict - - name: Install libmemcached-dev for pylibmc - run: sudo apt install -y libmemcached-dev + - name: Install system packages + run: | + sudo apt update + xargs -a .github/workflows/data/apt-packages.txt sudo apt install -y --no-install-recommends - name: Install and upgrade packaging tools run: python -m pip install --upgrade pip wheel - run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e . diff --git a/.github/workflows/python_matrix.yml b/.github/workflows/python_matrix.yml index 4d31af141a6e..cec3b0be06b5 100644 --- a/.github/workflows/python_matrix.yml +++ b/.github/workflows/python_matrix.yml @@ -49,8 +49,10 @@ jobs: python-version: ${{ matrix.python-version }} cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - - name: Install libmemcached-dev for pylibmc - run: sudo apt-get install libmemcached-dev + - name: Install system packages + run: | + sudo apt update + xargs -a .github/workflows/data/apt-packages.txt sudo apt install -y --no-install-recommends - name: Install and upgrade packaging tools run: python -m pip install --upgrade pip wheel - run: python -m pip install -r tests/requirements/py3.txt -e . diff --git a/.github/workflows/schedule_tests.yml b/.github/workflows/schedule_tests.yml index ae1f62022d58..3cb894a7a093 100644 --- a/.github/workflows/schedule_tests.yml +++ b/.github/workflows/schedule_tests.yml @@ -54,8 +54,10 @@ jobs: with: python-version: '3.14' cache: 'pip' - - name: Install libmemcached-dev for pylibmc - run: sudo apt-get install libmemcached-dev + - name: Install system packages + run: | + sudo apt update + xargs -a .github/workflows/data/apt-packages.txt sudo apt install -y --no-install-recommends - name: Install and upgrade packaging tools run: python -m pip install --upgrade pip wheel - run: python -m pip install . @@ -104,8 +106,10 @@ jobs: python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - - name: Install libmemcached-dev for pylibmc - run: sudo apt-get install libmemcached-dev + - name: Install system packages + run: | + sudo apt update + xargs -a .github/workflows/data/apt-packages.txt sudo apt install -y --no-install-recommends - name: Install and upgrade packaging tools run: python -m pip install --upgrade pip wheel - run: python -m pip install -r tests/requirements/py3.txt -e . @@ -143,8 +147,10 @@ jobs: python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - - name: Install libmemcached-dev for pylibmc - run: sudo apt-get install libmemcached-dev + - name: Install system packages + run: | + sudo apt update + xargs -a .github/workflows/data/apt-packages.txt sudo apt install -y --no-install-recommends - name: Install and upgrade packaging tools run: python -m pip install --upgrade pip wheel - run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e . @@ -191,8 +197,10 @@ jobs: python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - - name: Install libmemcached-dev for pylibmc - run: sudo apt-get install libmemcached-dev + - name: Install system packages + run: | + sudo apt update + xargs -a .github/workflows/data/apt-packages.txt sudo apt install -y --no-install-recommends - name: Install and upgrade packaging tools run: python -m pip install --upgrade pip wheel - run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e . diff --git a/.github/workflows/screenshots.yml b/.github/workflows/screenshots.yml index ae57ce71cf80..c98aa00db6bc 100644 --- a/.github/workflows/screenshots.yml +++ b/.github/workflows/screenshots.yml @@ -30,10 +30,10 @@ jobs: python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - - name: Update apt repo - run: sudo apt update - - name: Install libmemcached-dev for pylibmc - run: sudo apt install -y libmemcached-dev + - name: Install system packages + run: | + sudo apt update + xargs -a .github/workflows/data/apt-packages.txt sudo apt install -y --no-install-recommends - name: Install and upgrade packaging tools run: python -m pip install --upgrade pip wheel - run: python -m pip install -r tests/requirements/py3.txt -e . diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index c93808f92059..7ac14710f1c3 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -30,8 +30,10 @@ jobs: python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - - name: Install libmemcached-dev for pylibmc - run: sudo apt-get install libmemcached-dev + - name: Install system packages + run: | + sudo apt update + xargs -a .github/workflows/data/apt-packages.txt sudo apt install -y --no-install-recommends - name: Install and upgrade packaging tools run: python -m pip install --upgrade pip wheel - run: python -m pip install -r tests/requirements/py3.txt -e . @@ -70,8 +72,10 @@ jobs: python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - - name: Install libmemcached-dev for pylibmc - run: sudo apt-get install libmemcached-dev + - name: Install system packages + run: | + sudo apt update + xargs -a .github/workflows/data/apt-packages.txt sudo apt install -y --no-install-recommends - name: Install and upgrade packaging tools run: python -m pip install --upgrade pip wheel - run: python -m pip install -r tests/requirements/py3.txt -r tests/requirements/postgres.txt -e . From e909d5e3f62eb28670f71ba353406acf608b8c19 Mon Sep 17 00:00:00 2001 From: Natalia <124304+nessita@users.noreply.github.com> Date: Fri, 17 Jul 2026 12:56:17 -0300 Subject: [PATCH 2/3] Installed gettext in Github Actions workflows to avoid test skips. Test skips are being reported due to missing xgettext, e.g.: 18n.test_extraction.BasicExtractorTests.test_blocktranslate_trimmed ... skipped 'xgettext is mandatory for extraction tests' --- .github/workflows/data/apt-packages.txt | 1 + .github/workflows/tests.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/data/apt-packages.txt b/.github/workflows/data/apt-packages.txt index 907cbe18ac3b..e217cccb44a4 100644 --- a/.github/workflows/data/apt-packages.txt +++ b/.github/workflows/data/apt-packages.txt @@ -1 +1,2 @@ +gettext libmemcached-dev diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 76fc397f358e..82f1b2058331 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,6 +37,8 @@ jobs: python-version: ${{ matrix.python-version }} cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' + - name: Install gettext + run: choco install gettext --no-progress -y - name: Install and upgrade packaging tools run: python -m pip install --upgrade pip wheel - run: python -m pip install -r tests/requirements/py3.txt -e . From 3d34265d5d1b83fee5df3c1b6f55087b1a6a1ded Mon Sep 17 00:00:00 2001 From: Harvey Bellini Date: Wed, 21 Jan 2026 22:25:37 +0000 Subject: [PATCH 3/3] Fixed #35875 -- Added dark mode support to technical 404 and 500 error views. --- AUTHORS | 1 + django/views/templates/csrf_403.html | 13 ++--- django/views/templates/technical_404.html | 19 +++---- django/views/templates/technical_500.html | 62 ++++++++++++----------- 4 files changed, 51 insertions(+), 44 deletions(-) diff --git a/AUTHORS b/AUTHORS index 9187d1a6a5d5..981cacc69ef6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -432,6 +432,7 @@ answer newbie questions, and generally made Django that much better: Hannes Struß Hao Dong Harm Geerts + Harvey Bellini Hasan Ramezani Hawkeye Helen Sherwood-Taylor diff --git a/django/views/templates/csrf_403.html b/django/views/templates/csrf_403.html index fc367cad04af..466acf918702 100644 --- a/django/views/templates/csrf_403.html +++ b/django/views/templates/csrf_403.html @@ -9,15 +9,16 @@ html * { padding:0; margin:0; } body * { padding:10px 20px; } body * * { padding:0; } - body { font-family: sans-serif; background:#eee; color:#000; } - body>div { border-bottom:1px solid #ddd; } + body { font-family: sans-serif; background: light-dark(#eee, #121212); color: light-dark(#000, #e0e0e0); } + body>div { border-bottom:1px solid light-dark(#ddd, #444); } h1 { font-weight:normal; margin-bottom:.4em; } - h1 span { font-size:60%; color:#666; font-weight:normal; } - #info { background:#f6f6f6; } + h1 span { font-size:60%; color: light-dark(#666, #aaa); font-weight:normal; } + #info { background: light-dark(#f6f6f6, #1e1e1e); } #info ul { margin: 0.5em 4em; } #info p, #summary p { padding-top:10px; } - #summary { background: #ffc; } - #explanation { background:#eee; border-bottom: 0px none; } + #summary { background: light-dark(#ffc, #2b2b2b); } + #explanation { background: light-dark(#eee, #1f1f1f); border-bottom: 0px none; } + code { color: light-dark(#000, #e0e0e0); } diff --git a/django/views/templates/technical_404.html b/django/views/templates/technical_404.html index 899e405568eb..b482fd0f86a8 100644 --- a/django/views/templates/technical_404.html +++ b/django/views/templates/technical_404.html @@ -3,25 +3,26 @@ Page not found at {{ request.path_info }} - + diff --git a/django/views/templates/technical_500.html b/django/views/templates/technical_500.html index 7e57938ec95a..01eee90a1538 100644 --- a/django/views/templates/technical_500.html +++ b/django/views/templates/technical_500.html @@ -2,7 +2,7 @@ - + {% if exception_type %}{{ exception_type }}{% else %}Report{% endif %} {% if request %} at {{ request.path_info }}{% endif %} @@ -10,63 +10,67 @@ html * { padding:0; margin:0; } body * { padding:10px 20px; } body * * { padding:0; } - body { font-family: sans-serif; background-color:#fff; color:#000; } - body > header, body > main, body > footer { border-bottom:1px solid #ddd; } + body { font-family: sans-serif; background-color: light-dark(#fff, #121212); color: light-dark(#000, #e0e0e0); } + body > header, body > main, body > footer { border-bottom:1px solid light-dark(#ddd, #444); } h1 { font-weight:normal; } h2 { margin-bottom:.8em; } h3 { margin:1em 0 .5em 0; } h4 { margin:0 0 .5em 0; font-weight: normal; } code, pre { font-size: 100%; white-space: pre-wrap; word-break: break-word; } summary { cursor: pointer; } - table { border:1px solid #ccc; border-collapse: collapse; width:100%; background:white; } + table { border:1px solid light-dark(#ccc, #444); border-collapse: collapse; width:100%; background: light-dark(white, #1e1e1e); } tbody td, tbody th { vertical-align:top; padding:2px 3px; } thead th { - padding:1px 6px 1px 3px; background:#fefefe; text-align:left; - font-weight:normal; font-size: 0.6875rem; border:1px solid #ddd; + padding:1px 6px 1px 3px; background: light-dark(#fefefe, #2a2a2a); text-align:left; + font-weight:normal; font-size: 0.6875rem; border:1px solid light-dark(#ddd, #444); } - tbody th { width:12em; text-align:right; color:#666; padding-right:.5em; } + tbody th { width:12em; text-align:right; color: light-dark(#666, #aaa); padding-right:.5em; } table.vars { margin:5px 10px 2px 40px; width: auto; } table.vars td, table.req td { font-family:monospace; } table td.code { width:100%; } table td.code pre { overflow:hidden; } - table.source th { color:#666; } - table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; } - ul.traceback { list-style-type:none; color: #222; } + table.source th { color: light-dark(#666, #aaa); } + table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid light-dark(#eee, #444); } + ul.traceback { list-style-type:none; color: light-dark(#222, #e0e0e0); } ul.traceback li.cause { word-break: break-word; } - ul.traceback li.frame { padding-bottom:1em; color:#4f4f4f; } - ul.traceback li.user { background-color:#e0e0e0; color:#000 } + ul.traceback li.frame { padding-bottom:1em; color: light-dark(#4f4f4f, #bbb); } + ul.traceback li.user { background-color: light-dark(#e0e0e0, #2a2a2a); color: light-dark(#000, #e0e0e0); } div.context { padding:10px 0; overflow:hidden; } div.context ol { padding-left:30px; margin:0 10px; list-style-position: inside; } - div.context ol li { font-family:monospace; white-space:pre; color:#777; cursor:pointer; padding-left: 2px; } + div.context ol li { font-family:monospace; white-space:pre; color: light-dark(#777, #e0e0e0); cursor:pointer; padding-left: 2px; } div.context ol li pre { display:inline; } - div.context ol.context-line li { color:#464646; background-color:#dfdfdf; padding: 3px 2px; } + div.context ol.context-line li { color: light-dark(#464646, #fff); background-color: light-dark(#dfdfdf, #333333); padding: 3px 2px; } div.context ol.context-line li span { position:absolute; right:32px; } - .user div.context ol.context-line li { background-color:#bbb; color:#000; } - .user div.context ol li { color:#666; } + .user div.context ol.context-line li { background-color: light-dark(#bbb, #444); color: light-dark(#000, #fff); } + .user div.context ol li { color: light-dark(#666, #bbb); } div.commands, summary.commands { margin-left: 40px; } - div.commands a, summary.commands { color:#555; text-decoration:none; } - .user div.commands a { color: black; } - #summary { background: #ffc; } - #summary h2 { font-weight: normal; color: #666; } + div.commands a, summary.commands { color: light-dark(#555, #aaa); text-decoration:none; } + .user div.commands a { color: light-dark(black, #e0e0e0); } + #summary { background: light-dark(#ffc, #2b2b2b); } + #summary h2 { font-weight: normal; color: light-dark(#666, #aaa); } #info { padding: 0; } #info > * { padding:10px 20px; } - #explanation { background:#eee; } - #template, #template-not-exist { background:#f6f6f6; } + #explanation { background: light-dark(#eee, #1f1f1f); } + #template, #template-not-exist { background: light-dark(#f6f6f6, #1e1e1e); } #template-not-exist ul { margin: 0 0 10px 20px; } #template-not-exist .postmortem-section { margin-bottom: 3px; } - #unicode-hint { background:#eee; } - #traceback { background:#eee; } - #requestinfo { background:#f6f6f6; padding-left:120px; } + #unicode-hint { background: light-dark(#eee, #1e1e1e); } + #traceback { background: light-dark(#eee, #121212); } + #requestinfo { background: light-dark(#f6f6f6, #1e1e1e); padding-left:120px; } #summary table { border:none; background:transparent; } #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; } #requestinfo h3 { margin-bottom:-1em; } - .error { background: #ffc; } - .specific { color:#cc3300; font-weight:bold; } + .error { background: light-dark(#ffc, #3d3d00); } + .specific { color: light-dark(#cc3300, #ff6b6b); font-weight:bold; } h2 span.commands { font-size: 0.7rem; font-weight:normal; } - span.commands a:link {color:#5E5694;} - pre.exception_value { font-family: sans-serif; color: #575757; font-size: 1.5rem; margin: 10px 0 10px 0; } + span.commands a:link { color: light-dark(#5E5694, #a29bfe); } + pre.exception_value { font-family: sans-serif; color: light-dark(#575757, #e0e0e0); font-size: 1.5rem; margin: 10px 0 10px 0; } .append-bottom { margin-bottom: 10px; } .fname { user-select: all; } + code { color: light-dark(#000, #e0e0e0); } + #pastebinTraceback { background: light-dark(#fff, #1e1e1e); } + textarea { background: light-dark(#fff, #1e1e1e); color: light-dark(#000, #e0e0e0); border: 1px solid light-dark(#ccc, #444); } + input[type="submit"] { background: light-dark(#efefef, #333); color: light-dark(#000, #e0e0e0); border: 1px solid light-dark(#ccc, #555); } {% if not is_email %}