Skip to content

Commit 7e30c2d

Browse files
authored
Merge branch 'django:main' into dont-exclude-migrations-from-black
2 parents 92fcb3c + 6418dc1 commit 7e30c2d

File tree

24 files changed

+5934
-156
lines changed

24 files changed

+5934
-156
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
services:
1818
postgres:
19-
image: postgres:14-alpine
19+
image: postgres:17-trixie
2020
env:
2121
POSTGRES_PASSWORD: postgres
2222
options: >-
@@ -35,7 +35,7 @@ jobs:
3535
python-version: ${{ env.PYTHON_VERSION }}
3636
- name: Install dependencies
3737
run: |
38-
python -m pip install --upgrade pip setuptools coveralls
38+
python -m pip install --upgrade pip setuptools
3939
python -m pip install -r requirements/tests.txt
4040
- name: Set up databases
4141
run: |
@@ -60,12 +60,3 @@ jobs:
6060
- name: Run tests
6161
run: |
6262
make ci
63-
- name: Coveralls
64-
env:
65-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
COVERALLS_PARALLEL: true
67-
COVERALLS_FLAG_NAME: "${{ env.PYTHON_VERSION }}"
68-
COVERALLS_SERVICE_NAME: github
69-
COVERALLS_SERVICE_JOB_ID: "${{ github.run_id }}"
70-
COVERALLS_SERVICE_NUMBER: "${{ github.workflow }}-${{ github.run_number }}"
71-
run: coveralls --service=github

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ RUN apt-get update \
1414
gettext \
1515
git \
1616
libpq5 \
17+
postgresql-common \
1718
make \
1819
rsync \
20+
&& /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y \
21+
&& apt-get install --assume-yes --no-install-recommends \
22+
postgresql-client-17 \
1923
&& apt-get distclean
2024

2125
ARG REQ_FILE=requirements/prod.txt
@@ -41,5 +45,7 @@ RUN apt-get update \
4145
# copy project
4246
COPY . .
4347

48+
RUN python -m django compilemessages
49+
4450
# ENTRYPOINT is specified only in the local docker-compose.yml to avoid
4551
# accidentally running it in deployed environments.

README.rst

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ djangoproject.com source code
44
.. image:: https://github.com/django/djangoproject.com/workflows/Tests/badge.svg?branch=main
55
:target: https://github.com/django/djangoproject.com/actions
66

7-
.. image:: https://coveralls.io/repos/django/djangoproject.com/badge.svg?branch=main
8-
:target: https://coveralls.io/r/django/djangoproject.com?branch=main
9-
107
To run locally, you can either:
118

129
- Install and run from a virtual environment
@@ -87,7 +84,7 @@ Install and run locally from a virtual environment
8784
#. For docs (next step requires ``gettext``)::
8885

8986
python -m manage loaddata doc_releases
90-
python -m manage update_docs --update-index
87+
python -m manage update_docs
9188

9289
#. For dashboard:
9390

@@ -236,16 +233,8 @@ minified version of it to this directory.
236233
Documentation search
237234
--------------------
238235

239-
When running ``python -m manage update_docs --update-index`` to build all
240-
documents it will also automatically index every document it builds in the
241-
search engine as well. In case you've already built the documents and would like
242-
to reindex the search index, run the command::
243-
244-
python -m manage update_index
245-
246-
This is also the right command to run when you work on the search feature
247-
itself. You can pass the ``-d`` option to try to drop the search index
248-
first before indexing all the documents.
236+
When running ``python -m manage update_docs`` to build all documents it will
237+
also automatically index every document it builds in the search engine as well.
249238

250239
Updating metrics from production
251240
--------------------------------
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Copyright (C) Django Software Foundation and contributors
2+
# This file is distributed under the same license as the djangoproject.com
3+
# source files.
4+
#
5+
# Translators:
6+
# Yuuki Ebihara <[email protected]>, 2019
7+
# TANIGUCHI Taichi, 2025
8+
#
9+
#, fuzzy
10+
msgid ""
11+
msgstr ""
12+
"Project-Id-Version: PACKAGE VERSION\n"
13+
"Report-Msgid-Bugs-To: \n"
14+
"POT-Creation-Date: 2025-09-04 10:04-0500\n"
15+
"PO-Revision-Date: 2019-02-21 14:15+0000\n"
16+
"Last-Translator: TANIGUCHI Taichi, 2025\n"
17+
"Language-Team: Japanese (https://app.transifex.com/django/teams/17080/ja/)\n"
18+
"MIME-Version: 1.0\n"
19+
"Content-Type: text/plain; charset=UTF-8\n"
20+
"Content-Transfer-Encoding: 8bit\n"
21+
"Language: ja\n"
22+
"Plural-Forms: nplurals=1; plural=0;\n"
23+
24+
msgid "Instant"
25+
msgstr "即時"
26+
27+
msgid "Daily"
28+
msgstr "日次"
29+
30+
msgid "Weekly"
31+
msgstr "週次"
32+
33+
msgid "categories"
34+
msgstr "カテゴリー"
35+
36+
msgid "Jenkins instance root URL"
37+
msgstr "Jenkins インスタンスのルート URL"
38+
39+
msgid "E.g. http://ci.djangoproject.com/"
40+
msgstr "例: http://ci.djangoproject.com/"
41+
42+
msgid "E.g. Django Python3"
43+
msgstr "例: Django Python3"
44+
45+
msgid "Should the metric be a value representing success ratio?"
46+
msgstr "指標は成功率を表す値であるべきですか?"
47+
48+
msgid ""
49+
"E.g. if there are 50 tests of which 30 are failing the value of this metric "
50+
"will be 20 (or 40%.)"
51+
msgstr ""
52+
"例:50件のテストのうち30件が失敗している場合、この指標の値は20(または40%)"
53+
"になります。"
54+
55+
msgid "Should the metric be a percentage value?"
56+
msgstr "指標はパーセントの値であるべきですか?"
57+
58+
msgid ""
59+
"E.g. if there are 50 tests of which 30 are failing the value of this metric "
60+
"will be 60%."
61+
msgstr ""
62+
"例:50 件のテストのうち 30 件が失敗している場合、この指標の値は 60% になりま"
63+
"す。"
64+
65+
msgid "Development dashboard"
66+
msgstr "開発用ダッシュボード"
67+
68+
msgid "All metrics"
69+
msgstr "すべての指標"
70+
71+
#, python-format
72+
msgid "Updated %(timestamp)s ago."
73+
msgstr "%(timestamp)s前に更新"
74+
75+
#, python-format
76+
msgid "Could not find metric with slug %s"
77+
msgstr "スラグ %s の指標は見つかりませんでした"
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Copyright (C) Django Software Foundation and contributors
2+
# This file is distributed under the same license as the djangoproject.com
3+
# source files.
4+
#
5+
# Translators:
6+
# Daniel Nylander <[email protected]>, 2025
7+
#
8+
#, fuzzy
9+
msgid ""
10+
msgstr ""
11+
"Project-Id-Version: PACKAGE VERSION\n"
12+
"Report-Msgid-Bugs-To: \n"
13+
"POT-Creation-Date: 2025-09-04 10:04-0500\n"
14+
"PO-Revision-Date: 2019-02-21 14:15+0000\n"
15+
"Last-Translator: Daniel Nylander <[email protected]>, 2025\n"
16+
"Language-Team: Swedish (https://app.transifex.com/django/teams/17080/sv/)\n"
17+
"MIME-Version: 1.0\n"
18+
"Content-Type: text/plain; charset=UTF-8\n"
19+
"Content-Transfer-Encoding: 8bit\n"
20+
"Language: sv\n"
21+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
22+
23+
msgid "Instant"
24+
msgstr "Direkt"
25+
26+
msgid "Daily"
27+
msgstr "Dagligen"
28+
29+
msgid "Weekly"
30+
msgstr "Veckovis"
31+
32+
msgid "categories"
33+
msgstr "kategorier"
34+
35+
msgid "Jenkins instance root URL"
36+
msgstr "Jenkins-instansens rot-URL"
37+
38+
msgid "E.g. http://ci.djangoproject.com/"
39+
msgstr "T.ex. http://ci.djangoproject.com/"
40+
41+
msgid "E.g. Django Python3"
42+
msgstr "T.ex. Django Python3"
43+
44+
msgid "Should the metric be a value representing success ratio?"
45+
msgstr "Bör måttet vara ett värde som representerar framgångskvoten?"
46+
47+
msgid ""
48+
"E.g. if there are 50 tests of which 30 are failing the value of this metric "
49+
"will be 20 (or 40%.)"
50+
msgstr ""
51+
"Om det t.ex. finns 50 tester varav 30 underkänns blir värdet på detta mått "
52+
"20 (eller 40 %)"
53+
54+
msgid "Should the metric be a percentage value?"
55+
msgstr "Bör måttet vara ett procentvärde?"
56+
57+
msgid ""
58+
"E.g. if there are 50 tests of which 30 are failing the value of this metric "
59+
"will be 60%."
60+
msgstr ""
61+
"Om det t.ex. finns 50 tester varav 30 underkänns blir värdet på detta mått "
62+
"60%."
63+
64+
msgid "Development dashboard"
65+
msgstr "Instrumentpanel för utveckling"
66+
67+
msgid "All metrics"
68+
msgstr "Alla mätvärden"
69+
70+
#, python-format
71+
msgid "Updated %(timestamp)s ago."
72+
msgstr "Uppdaterades %(timestamp)s sedan."
73+
74+
#, python-format
75+
msgid "Could not find metric with slug %s"
76+
msgstr "Kunde inte hitta metric med slug %s"

djangoproject/settings/docker.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,21 @@
1111
}
1212
}
1313

14+
# Trac connection
15+
DATABASES["trac"] = {
16+
"ENGINE": "django.db.backends.postgresql",
17+
"NAME": os.environ.get("TRAC_DATABASE", "code.djangoproject"),
18+
"USER": os.environ.get("TRAC_USER", "code.djangoproject"),
19+
"PASSWORD": os.environ.get("TRAC_PASSWORD", ""),
20+
"HOST": os.environ.get("TRAC_HOST", "db"),
21+
"PORT": os.environ.get("TRAC_PORT", "5432"),
22+
}
23+
1424
SECRET_KEY = os.environ.get("SECRET_KEY")
1525

1626
ALLOWED_HOSTS = [".localhost", "127.0.0.1", "www.127.0.0.1"]
1727

1828
LOCALE_MIDDLEWARE_EXCLUDED_HOSTS = ["docs.djangoproject.localhost"]
1929

2030
# django-hosts settings
21-
PARENT_HOST = "localhost:8000"
31+
PARENT_HOST = "djangoproject.localhost:8000"

djangoproject/templates/includes/footer.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{% load hosts %}
2+
13
<footer>
24
<div class="subfooter">
35
<div class="container">
@@ -59,9 +61,9 @@ <h3>Follow Us</h3>
5961
<h3>Support Us</h3>
6062
<ul>
6163
<li><a href="{% url "fundraising:index" %}">Sponsor Django</a></li>
62-
<li><a href="/foundation/corporate-membership/">Corporate membership</a></li>
64+
<li><a href="{% host_url "homepage" host "www" %}foundation/corporate-membership/">Corporate membership</a></li>
6365
<li><a href="https://django.threadless.com/" target="_blank">Official merchandise store</a></li>
64-
<li><a href="/foundation/donate/#benevity-giving">Benevity Workplace Giving Program</a></li>
66+
<li><a href="{% host_url "homepage" host "www" %}foundation/donate/#benevity-giving">Benevity Workplace Giving Program</a></li>
6567
</ul>
6668
</div>
6769
</div>

docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,17 @@ services:
2121
- SQL_PASSWORD=secret
2222
- SQL_HOST=db
2323
- SQL_PORT=5432
24+
- TRAC_DATABASE=code.djangoproject
25+
- TRAC_USER=code.djangoproject
26+
- TRAC_PASSWORD=secret
27+
- TRAC_HOST=db
28+
- TRAC_PORT=5432
29+
2430
depends_on:
2531
db:
2632
condition: service_healthy
2733
db:
28-
image: postgres:14-bookworm
34+
image: postgres:17-trixie
2935
environment:
3036
- POSTGRES_USER=djangoproject
3137
- POSTGRES_PASSWORD=secret
@@ -35,3 +41,5 @@ services:
3541
interval: 1s
3642
timeout: 10s
3743
retries: 10
44+
volumes:
45+
- ./initdb/tracdb.sql:/docker-entrypoint-initdb.d/tracdb.sql

docker-entrypoint.dev.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
python -m manage flush --no-input
4-
# PGPASSWORD=djangoproject psql --host db --port 5432 --username=code.djangoproject --dbname=code.djangoproject < tracdb/trac.sql
4+
PGPASSWORD=secret psql --host db --port 5432 --username=code.djangoproject --dbname=code.djangoproject < tracdb/trac.sql
55
python -m manage migrate
66
make compile-scss # must come before collectstatic
77
python -m manage collectstatic --no-input --clear
@@ -12,6 +12,5 @@ python -m manage loaddata doc_releases
1212
python -m manage loaddata dashboard_production_metrics
1313
# python -m manage loaddata dashboard_example_data
1414
python -m manage update_metrics
15-
#python -m manage update_index
1615

1716
exec "$@"

0 commit comments

Comments
 (0)