From 7c6dff3b707393d49c20f1639da048272fd01b81 Mon Sep 17 00:00:00 2001 From: Hana Belay <66206865+earthcomfy@users.noreply.github.com> Date: Wed, 5 Feb 2025 13:57:30 +0300 Subject: [PATCH 01/15] Add missing trailing slash in test `MEDIA_URL` (#5666) --- {{cookiecutter.project_slug}}/config/settings/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/test.py b/{{cookiecutter.project_slug}}/config/settings/test.py index 696b48710..43464ab3f 100644 --- a/{{cookiecutter.project_slug}}/config/settings/test.py +++ b/{{cookiecutter.project_slug}}/config/settings/test.py @@ -33,7 +33,7 @@ TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore[index] # MEDIA # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#media-url -MEDIA_URL = "http://media.testserver" +MEDIA_URL = "http://media.testserver/" {%- if cookiecutter.frontend_pipeline == 'Webpack' %} # django-webpack-loader From 0be2d9c9195fde8c1bb0a48b962ed5cc7c7436f0 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 5 Feb 2025 16:48:24 +0000 Subject: [PATCH 02/15] Update django from 5.0.11 to 5.0.12 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index bb956ddc4..47168a2fe 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -29,7 +29,7 @@ uvicorn-worker==0.3.0 # https://github.com/Kludex/uvicorn-worker # Django # ------------------------------------------------------------------------------ -django==5.0.11 # pyup: < 5.1 # https://www.djangoproject.com/ +django==5.0.12 # pyup: < 5.1 # https://www.djangoproject.com/ django-environ==0.12.0 # https://github.com/joke2k/django-environ django-model-utils==5.0.0 # https://github.com/jazzband/django-model-utils django-allauth[mfa]==65.3.1 # https://github.com/pennersr/django-allauth From 6b8545a95dd705d689140d6398f635490d2e07d6 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 6 Feb 2025 02:26:42 +0000 Subject: [PATCH 03/15] Release 2025.02.05 --- CHANGELOG.md | 11 +++++++++++ pyproject.toml | 2 +- uv.lock | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7813de648..4e3eba53f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2025.02.05 + + +### Changed + +- Add missing trailing slash in test `MEDIA_URL` ([#5666](https://github.com/cookiecutter/cookiecutter-django/pull/5666)) + +### Updated + +- Update django to 5.0.12 ([#5667](https://github.com/cookiecutter/cookiecutter-django/pull/5667)) + ## 2025.02.03 diff --git a/pyproject.toml b/pyproject.toml index 6a5a3816a..804ce8543 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cookiecutter-django" -version = "2025.02.03" +version = "2025.02.05" description = "A Cookiecutter template for creating production-ready Django projects quickly." readme = "README.md" keywords = [ diff --git a/uv.lock b/uv.lock index ea46071d8..28c430122 100644 --- a/uv.lock +++ b/uv.lock @@ -182,7 +182,7 @@ wheels = [ [[package]] name = "cookiecutter-django" -version = "2025.2.3" +version = "2025.2.5" source = { virtual = "." } dependencies = [ { name = "binaryornot" }, From 8a019b40cf82d82a82cc17a749dd46bc0fa0d56a Mon Sep 17 00:00:00 2001 From: Alan Cyment Date: Thu, 6 Feb 2025 19:23:12 -0300 Subject: [PATCH 04/15] Bumped node version of Django Dockerfile to 22.13 (#5672) --- .../compose/production/django/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 570726f13..b84bc7a78 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -1,5 +1,5 @@ {% if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] -%} -FROM docker.io/node:20-bookworm-slim AS client-builder +FROM docker.io/node:22.13-bookworm-slim AS client-builder ARG APP_HOME=/app WORKDIR ${APP_HOME} @@ -61,7 +61,7 @@ ENV BUILD_ENV=${BUILD_ENVIRONMENT} WORKDIR ${APP_HOME} RUN addgroup --system django \ - && adduser --system --ingroup django django + && adduser --system --ingroup django django # Install required system dependencies From bde74225a3c7f246dafdfe9915c2829827098da8 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 6 Feb 2025 22:23:31 +0000 Subject: [PATCH 05/15] Update Contributors --- .github/contributors.json | 5 +++++ CONTRIBUTORS.md | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/.github/contributors.json b/.github/contributors.json index 9bb91b580..9aaf688a8 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1688,5 +1688,10 @@ "name": "Ed Morley", "github_login": "edmorley", "twitter_username": "" + }, + { + "name": "Alan Cyment", + "github_login": "acyment", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index de8330c91..80b0d7344 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -201,6 +201,13 @@ Listed in alphabetical order. + + Alan Cyment + + acyment + + + Alberto Sanchez From 17e5ad3f17598207fc816258bc1c69a6da4355cc Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 6 Feb 2025 14:55:52 -0800 Subject: [PATCH 06/15] Update ruff to 0.9.5 (#5673) * Update ruff from 0.9.4 to 0.9.5 * Align Ruff versions --------- Co-authored-by: pyup-bot <16239342+pyup-bot@users.noreply.github.com> --- pyproject.toml | 2 +- uv.lock | 40 +++++++++---------- .../.pre-commit-config.yaml | 2 +- .../requirements/local.txt | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 804ce8543..744193814 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dependencies = [ "pytest-xdist==3.6.1", "pyyaml==6.0.2", "requests==2.32.3", - "ruff==0.9.4", + "ruff==0.9.5", "sh==2.1; sys_platform!='win23'", "tox==4.23.2", "tox-uv>=1.17", diff --git a/uv.lock b/uv.lock index 28c430122..37e96c0ea 100644 --- a/uv.lock +++ b/uv.lock @@ -229,7 +229,7 @@ requires-dist = [ { name = "pytest-xdist", specifier = "==3.6.1" }, { name = "pyyaml", specifier = "==6.0.2" }, { name = "requests", specifier = "==2.32.3" }, - { name = "ruff", specifier = "==0.9.4" }, + { name = "ruff", specifier = "==0.9.5" }, { name = "sh", marker = "sys_platform != 'win23'", specifier = "==2.1" }, { name = "tox", specifier = "==4.23.2" }, { name = "tox-uv", specifier = ">=1.17" }, @@ -830,27 +830,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.9.4" +version = "0.9.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c0/17/529e78f49fc6f8076f50d985edd9a2cf011d1dbadb1cdeacc1d12afc1d26/ruff-0.9.4.tar.gz", hash = "sha256:6907ee3529244bb0ed066683e075f09285b38dd5b4039370df6ff06041ca19e7", size = 3599458 } +sdist = { url = "https://files.pythonhosted.org/packages/02/74/6c359f6b9ed85b88df6ef31febce18faeb852f6c9855651dfb1184a46845/ruff-0.9.5.tar.gz", hash = "sha256:11aecd7a633932875ab3cb05a484c99970b9d52606ce9ea912b690b02653d56c", size = 3634177 } wheels = [ - { url = "https://files.pythonhosted.org/packages/b6/f8/3fafb7804d82e0699a122101b5bee5f0d6e17c3a806dcbc527bb7d3f5b7a/ruff-0.9.4-py3-none-linux_armv6l.whl", hash = "sha256:64e73d25b954f71ff100bb70f39f1ee09e880728efb4250c632ceed4e4cdf706", size = 11668400 }, - { url = "https://files.pythonhosted.org/packages/2e/a6/2efa772d335da48a70ab2c6bb41a096c8517ca43c086ea672d51079e3d1f/ruff-0.9.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6ce6743ed64d9afab4fafeaea70d3631b4d4b28b592db21a5c2d1f0ef52934bf", size = 11628395 }, - { url = "https://files.pythonhosted.org/packages/dc/d7/cd822437561082f1c9d7225cc0d0fbb4bad117ad7ac3c41cd5d7f0fa948c/ruff-0.9.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:54499fb08408e32b57360f6f9de7157a5fec24ad79cb3f42ef2c3f3f728dfe2b", size = 11090052 }, - { url = "https://files.pythonhosted.org/packages/9e/67/3660d58e893d470abb9a13f679223368ff1684a4ef40f254a0157f51b448/ruff-0.9.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37c892540108314a6f01f105040b5106aeb829fa5fb0561d2dcaf71485021137", size = 11882221 }, - { url = "https://files.pythonhosted.org/packages/79/d1/757559995c8ba5f14dfec4459ef2dd3fcea82ac43bc4e7c7bf47484180c0/ruff-0.9.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:de9edf2ce4b9ddf43fd93e20ef635a900e25f622f87ed6e3047a664d0e8f810e", size = 11424862 }, - { url = "https://files.pythonhosted.org/packages/c0/96/7915a7c6877bb734caa6a2af424045baf6419f685632469643dbd8eb2958/ruff-0.9.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87c90c32357c74f11deb7fbb065126d91771b207bf9bfaaee01277ca59b574ec", size = 12626735 }, - { url = "https://files.pythonhosted.org/packages/0e/cc/dadb9b35473d7cb17c7ffe4737b4377aeec519a446ee8514123ff4a26091/ruff-0.9.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:56acd6c694da3695a7461cc55775f3a409c3815ac467279dfa126061d84b314b", size = 13255976 }, - { url = "https://files.pythonhosted.org/packages/5f/c3/ad2dd59d3cabbc12df308cced780f9c14367f0321e7800ca0fe52849da4c/ruff-0.9.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e0c93e7d47ed951b9394cf352d6695b31498e68fd5782d6cbc282425655f687a", size = 12752262 }, - { url = "https://files.pythonhosted.org/packages/c7/17/5f1971e54bd71604da6788efd84d66d789362b1105e17e5ccc53bba0289b/ruff-0.9.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1d4c8772670aecf037d1bf7a07c39106574d143b26cfe5ed1787d2f31e800214", size = 14401648 }, - { url = "https://files.pythonhosted.org/packages/30/24/6200b13ea611b83260501b6955b764bb320e23b2b75884c60ee7d3f0b68e/ruff-0.9.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfc5f1d7afeda8d5d37660eeca6d389b142d7f2b5a1ab659d9214ebd0e025231", size = 12414702 }, - { url = "https://files.pythonhosted.org/packages/34/cb/f5d50d0c4ecdcc7670e348bd0b11878154bc4617f3fdd1e8ad5297c0d0ba/ruff-0.9.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:faa935fc00ae854d8b638c16a5f1ce881bc3f67446957dd6f2af440a5fc8526b", size = 11859608 }, - { url = "https://files.pythonhosted.org/packages/d6/f4/9c8499ae8426da48363bbb78d081b817b0f64a9305f9b7f87eab2a8fb2c1/ruff-0.9.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a6c634fc6f5a0ceae1ab3e13c58183978185d131a29c425e4eaa9f40afe1e6d6", size = 11485702 }, - { url = "https://files.pythonhosted.org/packages/18/59/30490e483e804ccaa8147dd78c52e44ff96e1c30b5a95d69a63163cdb15b/ruff-0.9.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:433dedf6ddfdec7f1ac7575ec1eb9844fa60c4c8c2f8887a070672b8d353d34c", size = 12067782 }, - { url = "https://files.pythonhosted.org/packages/3d/8c/893fa9551760b2f8eb2a351b603e96f15af167ceaf27e27ad873570bc04c/ruff-0.9.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d612dbd0f3a919a8cc1d12037168bfa536862066808960e0cc901404b77968f0", size = 12483087 }, - { url = "https://files.pythonhosted.org/packages/23/15/f6751c07c21ca10e3f4a51ea495ca975ad936d780c347d9808bcedbd7182/ruff-0.9.4-py3-none-win32.whl", hash = "sha256:db1192ddda2200671f9ef61d9597fcef89d934f5d1705e571a93a67fb13a4402", size = 9852302 }, - { url = "https://files.pythonhosted.org/packages/12/41/2d2d2c6a72e62566f730e49254f602dfed23019c33b5b21ea8f8917315a1/ruff-0.9.4-py3-none-win_amd64.whl", hash = "sha256:05bebf4cdbe3ef75430d26c375773978950bbf4ee3c95ccb5448940dc092408e", size = 10850051 }, - { url = "https://files.pythonhosted.org/packages/c6/e6/3d6ec3bc3d254e7f005c543a661a41c3e788976d0e52a1ada195bd664344/ruff-0.9.4-py3-none-win_arm64.whl", hash = "sha256:585792f1e81509e38ac5123492f8875fbc36f3ede8185af0a26df348e5154f41", size = 10078251 }, + { url = "https://files.pythonhosted.org/packages/17/4b/82b7c9ac874e72b82b19fd7eab57d122e2df44d2478d90825854f9232d02/ruff-0.9.5-py3-none-linux_armv6l.whl", hash = "sha256:d466d2abc05f39018d53f681fa1c0ffe9570e6d73cde1b65d23bb557c846f442", size = 11681264 }, + { url = "https://files.pythonhosted.org/packages/27/5c/f5ae0a9564e04108c132e1139d60491c0abc621397fe79a50b3dc0bd704b/ruff-0.9.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:38840dbcef63948657fa7605ca363194d2fe8c26ce8f9ae12eee7f098c85ac8a", size = 11657554 }, + { url = "https://files.pythonhosted.org/packages/2a/83/c6926fa3ccb97cdb3c438bb56a490b395770c750bf59f9bc1fe57ae88264/ruff-0.9.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d56ba06da53536b575fbd2b56517f6f95774ff7be0f62c80b9e67430391eeb36", size = 11088959 }, + { url = "https://files.pythonhosted.org/packages/af/a7/42d1832b752fe969ffdbfcb1b4cb477cb271bed5835110fb0a16ef31ab81/ruff-0.9.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f7cb2a01da08244c50b20ccfaeb5972e4228c3c3a1989d3ece2bc4b1f996001", size = 11902041 }, + { url = "https://files.pythonhosted.org/packages/53/cf/1fffa09fb518d646f560ccfba59f91b23c731e461d6a4dedd21a393a1ff1/ruff-0.9.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:96d5c76358419bc63a671caac70c18732d4fd0341646ecd01641ddda5c39ca0b", size = 11421069 }, + { url = "https://files.pythonhosted.org/packages/09/27/bb8f1b7304e2a9431f631ae7eadc35550fe0cf620a2a6a0fc4aa3d736f94/ruff-0.9.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:deb8304636ed394211f3a6d46c0e7d9535b016f53adaa8340139859b2359a070", size = 12625095 }, + { url = "https://files.pythonhosted.org/packages/d7/ce/ab00bc9d3df35a5f1b64f5117458160a009f93ae5caf65894ebb63a1842d/ruff-0.9.5-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:df455000bf59e62b3e8c7ba5ed88a4a2bc64896f900f311dc23ff2dc38156440", size = 13257797 }, + { url = "https://files.pythonhosted.org/packages/88/81/c639a082ae6d8392bc52256058ec60f493c6a4d06d5505bccface3767e61/ruff-0.9.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de92170dfa50c32a2b8206a647949590e752aca8100a0f6b8cefa02ae29dce80", size = 12763793 }, + { url = "https://files.pythonhosted.org/packages/b3/d0/0a3d8f56d1e49af466dc770eeec5c125977ba9479af92e484b5b0251ce9c/ruff-0.9.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d28532d73b1f3f627ba88e1456f50748b37f3a345d2be76e4c653bec6c3e393", size = 14386234 }, + { url = "https://files.pythonhosted.org/packages/04/70/e59c192a3ad476355e7f45fb3a87326f5219cc7c472e6b040c6c6595c8f0/ruff-0.9.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c746d7d1df64f31d90503ece5cc34d7007c06751a7a3bbeee10e5f2463d52d2", size = 12437505 }, + { url = "https://files.pythonhosted.org/packages/55/4e/3abba60a259d79c391713e7a6ccabf7e2c96e5e0a19100bc4204f1a43a51/ruff-0.9.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:11417521d6f2d121fda376f0d2169fb529976c544d653d1d6044f4c5562516ee", size = 11884799 }, + { url = "https://files.pythonhosted.org/packages/a3/db/b0183a01a9f25b4efcae919c18fb41d32f985676c917008620ad692b9d5f/ruff-0.9.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:5b9d71c3879eb32de700f2f6fac3d46566f644a91d3130119a6378f9312a38e1", size = 11527411 }, + { url = "https://files.pythonhosted.org/packages/0a/e4/3ebfcebca3dff1559a74c6becff76e0b64689cea02b7aab15b8b32ea245d/ruff-0.9.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:2e36c61145e70febcb78483903c43444c6b9d40f6d2f800b5552fec6e4a7bb9a", size = 12078868 }, + { url = "https://files.pythonhosted.org/packages/ec/b2/5ab808833e06c0a1b0d046a51c06ec5687b73c78b116e8d77687dc0cd515/ruff-0.9.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:2f71d09aeba026c922aa7aa19a08d7bd27c867aedb2f74285a2639644c1c12f5", size = 12524374 }, + { url = "https://files.pythonhosted.org/packages/e0/51/1432afcc3b7aa6586c480142caae5323d59750925c3559688f2a9867343f/ruff-0.9.5-py3-none-win32.whl", hash = "sha256:134f958d52aa6fdec3b294b8ebe2320a950d10c041473c4316d2e7d7c2544723", size = 9853682 }, + { url = "https://files.pythonhosted.org/packages/b7/ad/c7a900591bd152bb47fc4882a27654ea55c7973e6d5d6396298ad3fd6638/ruff-0.9.5-py3-none-win_amd64.whl", hash = "sha256:78cc6067f6d80b6745b67498fb84e87d32c6fc34992b52bffefbdae3442967d6", size = 10865744 }, + { url = "https://files.pythonhosted.org/packages/75/d9/fde7610abd53c0c76b6af72fc679cb377b27c617ba704e25da834e0a0608/ruff-0.9.5-py3-none-win_arm64.whl", hash = "sha256:18a29f1a005bddb229e580795627d297dfa99f16b30c7039e73278cf6b5f9fa9", size = 10064595 }, ] [[package]] diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 74852c3b1..673c6c8f2 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: # Run the Ruff linter. - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.4 + rev: v0.9.5 hooks: # Linter - id: ruff diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 3daa9d0a8..3c1db3b6c 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -28,7 +28,7 @@ sphinx-autobuild==2024.10.3 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ -ruff==0.9.4 # https://github.com/astral-sh/ruff +ruff==0.9.5 # https://github.com/astral-sh/ruff coverage==7.6.10 # https://github.com/nedbat/coveragepy djlint==1.36.4 # https://github.com/Riverside-Healthcare/djLint pre-commit==4.1.0 # https://github.com/pre-commit/pre-commit From c37b46e5cf50016ecaaad6e47e8844745137e444 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 7 Feb 2025 02:27:02 +0000 Subject: [PATCH 07/15] Release 2025.02.06 --- CHANGELOG.md | 11 +++++++++++ pyproject.toml | 2 +- uv.lock | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3eba53f..35959510f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2025.02.06 + + +### Fixed + +- Bump node version in production Dockerfile from 20 to 22.13 ([#5672](https://github.com/cookiecutter/cookiecutter-django/pull/5672)) + +### Updated + +- Update ruff to 0.9.5 ([#5673](https://github.com/cookiecutter/cookiecutter-django/pull/5673)) + ## 2025.02.05 diff --git a/pyproject.toml b/pyproject.toml index 744193814..73c2cc15c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cookiecutter-django" -version = "2025.02.05" +version = "2025.02.06" description = "A Cookiecutter template for creating production-ready Django projects quickly." readme = "README.md" keywords = [ diff --git a/uv.lock b/uv.lock index 37e96c0ea..ab52e97b9 100644 --- a/uv.lock +++ b/uv.lock @@ -182,7 +182,7 @@ wheels = [ [[package]] name = "cookiecutter-django" -version = "2025.2.5" +version = "2025.2.6" source = { virtual = "." } dependencies = [ { name = "binaryornot" }, From 36b7e7754d8cfae0cacc497bb1153ca6c4e91f37 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 7 Feb 2025 02:03:48 -0800 Subject: [PATCH 08/15] Update whitenoise to 6.9.0 (#5674) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 47168a2fe..26872d9d5 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -9,7 +9,7 @@ rcssmin==1.1.2 # https://github.com/ndparker/rcssmin {%- endif %} argon2-cffi==23.1.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} -whitenoise==6.8.2 # https://github.com/evansd/whitenoise +whitenoise==6.9.0 # https://github.com/evansd/whitenoise {%- endif %} redis==5.2.1 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} From f79dbf9e1709b03509ae7e2692da4623cf87c695 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 7 Feb 2025 02:03:58 -0800 Subject: [PATCH 09/15] Update django-cors-headers to 4.7.0 (#5675) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 26872d9d5..4a64186b5 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -42,7 +42,7 @@ django-redis==5.4.0 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == 'y' %} # Django REST Framework djangorestframework==3.15.2 # https://github.com/encode/django-rest-framework -django-cors-headers==4.6.0 # https://github.com/adamchainz/django-cors-headers +django-cors-headers==4.7.0 # https://github.com/adamchainz/django-cors-headers # DRF-spectacular for api documentation drf-spectacular==0.28.0 # https://github.com/tfranzel/drf-spectacular {%- endif %} From 08cf6f72e5429a500a1733d94446ade8a730bc4e Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 7 Feb 2025 10:12:43 +0000 Subject: [PATCH 10/15] Update node version in production docker file --- scripts/node_version.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/scripts/node_version.py b/scripts/node_version.py index 6264f8ee6..5455428a3 100644 --- a/scripts/node_version.py +++ b/scripts/node_version.py @@ -4,19 +4,23 @@ from pathlib import Path ROOT = Path(__file__).parent.parent TEMPLATED_ROOT = ROOT / "{{cookiecutter.project_slug}}" DOCKERFILE = TEMPLATED_ROOT / "compose" / "local" / "node" / "Dockerfile" +PROD_DOCKERFILE = TEMPLATED_ROOT / "compose" / "production" / "django" / "Dockerfile" PACKAGE_JSON = TEMPLATED_ROOT / "package.json" CI_YML = ROOT / ".github" / "workflows" / "ci.yml" -def main(): +def main() -> None: new_version = get_version_from_dockerfile() + if new_version is None: + raise RuntimeError(f"No version found in {DOCKERFILE}") + old_version = get_version_from_package_json() if old_version != new_version: update_package_json_version(old_version, new_version) update_ci_node_version(old_version, new_version) -def get_version_from_dockerfile(): +def get_version_from_dockerfile() -> str | None: # Extract version out of base image name: # FROM docker.io/node:22.13-bookworm-slim # -> 22.13 @@ -28,12 +32,12 @@ def get_version_from_dockerfile(): return version_str -def get_version_from_package_json(): +def get_version_from_package_json() -> str: package_json = json.loads(PACKAGE_JSON.read_text()) return package_json["engines"]["node"] -def update_package_json_version(old_version, new_version): +def update_package_json_version(old_version: str, new_version: str) -> None: package_json_text = PACKAGE_JSON.read_text() package_json_text = package_json_text.replace( f'"node": "{old_version}"', @@ -42,7 +46,7 @@ def update_package_json_version(old_version, new_version): PACKAGE_JSON.write_text(package_json_text) -def update_ci_node_version(old_version, new_version): +def update_ci_node_version(old_version: str, new_version: str) -> None: yml_content = CI_YML.read_text() yml_content = yml_content.replace( f'node-version: "{old_version}"', @@ -50,6 +54,14 @@ def update_ci_node_version(old_version, new_version): ) CI_YML.write_text(yml_content) +def update_production_node_version(old_version: str, new_version: str) -> None: + dockerfile_content = PROD_DOCKERFILE.read_text() + dockerfile_content = dockerfile_content.replace( + f'FROM docker.io/node:{old_version}', + f'FROM docker.io/node:{new_version}', + ) + PROD_DOCKERFILE.write_text(dockerfile_content) + if __name__ == "__main__": main() From 978455aa94ebce73c4b33686180d152717c5fe17 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 7 Feb 2025 03:08:49 -0800 Subject: [PATCH 11/15] Update django-allauth to 65.4.1 (#5679) Co-authored-by: Bruno Alla --- scripts/node_version.py | 5 +++-- {{cookiecutter.project_slug}}/config/settings/base.py | 2 +- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/node_version.py b/scripts/node_version.py index 5455428a3..c478c60cc 100644 --- a/scripts/node_version.py +++ b/scripts/node_version.py @@ -54,11 +54,12 @@ def update_ci_node_version(old_version: str, new_version: str) -> None: ) CI_YML.write_text(yml_content) + def update_production_node_version(old_version: str, new_version: str) -> None: dockerfile_content = PROD_DOCKERFILE.read_text() dockerfile_content = dockerfile_content.replace( - f'FROM docker.io/node:{old_version}', - f'FROM docker.io/node:{new_version}', + f"FROM docker.io/node:{old_version}", + f"FROM docker.io/node:{new_version}", ) PROD_DOCKERFILE.write_text(dockerfile_content) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index ca7d6b531..22876096c 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -335,7 +335,7 @@ CELERY_WORKER_HIJACK_ROOT_LOGGER = False # ------------------------------------------------------------------------------ ACCOUNT_ALLOW_REGISTRATION = env.bool("DJANGO_ACCOUNT_ALLOW_REGISTRATION", True) # https://docs.allauth.org/en/latest/account/configuration.html -ACCOUNT_AUTHENTICATION_METHOD = "{{cookiecutter.username_type}}" +ACCOUNT_LOGIN_METHODS = {"{{cookiecutter.username_type}}"} # https://docs.allauth.org/en/latest/account/configuration.html ACCOUNT_EMAIL_REQUIRED = True {%- if cookiecutter.username_type == "email" %} diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 4a64186b5..8bf3eb2eb 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -32,7 +32,7 @@ uvicorn-worker==0.3.0 # https://github.com/Kludex/uvicorn-worker django==5.0.12 # pyup: < 5.1 # https://www.djangoproject.com/ django-environ==0.12.0 # https://github.com/joke2k/django-environ django-model-utils==5.0.0 # https://github.com/jazzband/django-model-utils -django-allauth[mfa]==65.3.1 # https://github.com/pennersr/django-allauth +django-allauth[mfa]==65.4.1 # https://github.com/pennersr/django-allauth django-crispy-forms==2.3 # https://github.com/django-crispy-forms/django-crispy-forms crispy-bootstrap5==2024.10 # https://github.com/django-crispy-forms/crispy-bootstrap5 {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} From d04d3802f3e0801457d4b2082bbbcb04dde5a6e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 23:07:51 +0000 Subject: [PATCH 12/15] Bump python from 3.12.8 to 3.12.9 in docs Docker image (#5676) Bumps python from 3.12.8-slim-bookworm to 3.12.9-slim-bookworm. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- {{cookiecutter.project_slug}}/compose/local/docs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile index ba9e579fd..789585281 100644 --- a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile @@ -1,5 +1,5 @@ # define an alias for the specific python version used in this file. -FROM docker.io/python:3.12.8-slim-bookworm AS python +FROM docker.io/python:3.12.9-slim-bookworm AS python # Python build stage From bcf96d432f0bdc33e387b244b34206933266697c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 23:08:38 +0000 Subject: [PATCH 13/15] Bump python from 3.12.8 to 3.12.9 in production Docker image (#5677) Bumps python from 3.12.8-slim-bookworm to 3.12.9-slim-bookworm. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../compose/production/django/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index b84bc7a78..0e1d767f2 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -25,7 +25,7 @@ RUN npm run build {%- endif %} # define an alias for the specific python version used in this file. -FROM docker.io/python:3.12.8-slim-bookworm AS python +FROM docker.io/python:3.12.9-slim-bookworm AS python # Python build stage FROM python AS python-build-stage From 1962169f57520a3e3fcdcb81bc5e31b4f5061194 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 23:09:13 +0000 Subject: [PATCH 14/15] Bump python from 3.12.8 to 3.12.9 in local Docker image (#5678) Bumps python from 3.12.8-slim-bookworm to 3.12.9-slim-bookworm. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- {{cookiecutter.project_slug}}/compose/local/django/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index b8ff85977..40cea6841 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -1,5 +1,5 @@ # define an alias for the specific python version used in this file. -FROM docker.io/python:3.12.8-slim-bookworm AS python +FROM docker.io/python:3.12.9-slim-bookworm AS python # Python build stage FROM python AS python-build-stage From 67b3a7b9f36023b54d0d5172e51f80b7351332d2 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 7 Feb 2025 15:10:08 -0800 Subject: [PATCH 15/15] Update django-stubs to 5.1.3 (#5680) --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 3c1db3b6c..c697b953d 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -14,7 +14,7 @@ watchfiles==1.0.4 # https://github.com/samuelcolvin/watchfiles # Testing # ------------------------------------------------------------------------------ mypy==1.13.0 # https://github.com/python/mypy -django-stubs[compatible-mypy]==5.1.2 # https://github.com/typeddjango/django-stubs +django-stubs[compatible-mypy]==5.1.3 # https://github.com/typeddjango/django-stubs pytest==8.3.4 # https://github.com/pytest-dev/pytest pytest-sugar==1.0.0 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %}