diff --git a/.github/contributors.json b/.github/contributors.json index d12318517..55e8d4f38 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": "" } ] diff --git a/.github/workflows/ruff-version.yml b/.github/workflows/align-versions.yml similarity index 68% rename from .github/workflows/ruff-version.yml rename to .github/workflows/align-versions.yml index a4f8b2617..0f2d09235 100644 --- a/.github/workflows/ruff-version.yml +++ b/.github/workflows/align-versions.yml @@ -1,19 +1,27 @@ -name: ruff +name: align versions on: pull_request: paths: - "{{cookiecutter.project_slug}}/requirements/local.txt" + - "{{cookiecutter.project_slug}}/compose/local/node/Dockerfile" permissions: contents: write pull-requests: write jobs: - version: + run: runs-on: ubuntu-latest env: GH_PAT: ${{ secrets.GH_PAT }} + + strategy: + fail-fast: false + matrix: + script: + - scripts/ruff_version.py + - scripts/node_version.py steps: - name: Checkout with token uses: actions/checkout@v4 @@ -30,8 +38,8 @@ jobs: - uses: astral-sh/setup-uv@v5 - - run: uv run scripts/ruff_version.py + - run: uv run ${{ matrix.script }} - uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: Align Ruff versions + commit_message: Align versions diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 87c828ba1..9cb8e4b36 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,14 +53,6 @@ repos: hooks: - id: pyproject-fmt - - repo: local - hooks: - - id: node-version-checker - name: node-version-checker - entry: python scripts/node_version.py - language: python - files: . - ci: autoupdate_schedule: weekly skip: [] diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3eba53f..f673bc4e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,45 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2025.02.08 + + +### Updated + +- Update coverage to 7.6.11 ([#5681](https://github.com/cookiecutter/cookiecutter-django/pull/5681)) + +## 2025.02.07 + + +### Updated + +- Update mypy to 1.15.0 ([#5664](https://github.com/cookiecutter/cookiecutter-django/pull/5664)) + +- Update django-stubs to 5.1.3 ([#5680](https://github.com/cookiecutter/cookiecutter-django/pull/5680)) + +- Bump python from 3.12.8 to 3.12.9 in local Docker image ([#5678](https://github.com/cookiecutter/cookiecutter-django/pull/5678)) + +- Bump python from 3.12.8 to 3.12.9 in production Docker image ([#5677](https://github.com/cookiecutter/cookiecutter-django/pull/5677)) + +- Bump python from 3.12.8 to 3.12.9 in docs Docker image ([#5676](https://github.com/cookiecutter/cookiecutter-django/pull/5676)) + +- Update django-allauth to 65.4.1 ([#5679](https://github.com/cookiecutter/cookiecutter-django/pull/5679)) + +- Update django-cors-headers to 4.7.0 ([#5675](https://github.com/cookiecutter/cookiecutter-django/pull/5675)) + +- Update whitenoise to 6.9.0 ([#5674](https://github.com/cookiecutter/cookiecutter-django/pull/5674)) + +## 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/CONTRIBUTORS.md b/CONTRIBUTORS.md index b77299e1a..f92ecba61 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -201,6 +201,13 @@ Listed in alphabetical order. + + Alan Cyment + + acyment + + + Alberto Sanchez diff --git a/pyproject.toml b/pyproject.toml index 804ce8543..0689d2d36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cookiecutter-django" -version = "2025.02.05" +version = "2025.02.08" description = "A Cookiecutter template for creating production-ready Django projects quickly." readme = "README.md" keywords = [ @@ -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.6", "sh==2.1; sys_platform!='win23'", "tox==4.23.2", "tox-uv>=1.17", diff --git a/scripts/node_version.py b/scripts/node_version.py index 6264f8ee6..c478c60cc 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}"', @@ -51,5 +55,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() diff --git a/uv.lock b/uv.lock index 28c430122..efbe9ec44 100644 --- a/uv.lock +++ b/uv.lock @@ -182,7 +182,7 @@ wheels = [ [[package]] name = "cookiecutter-django" -version = "2025.2.5" +version = "2025.2.8" source = { virtual = "." } dependencies = [ { name = "binaryornot" }, @@ -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.6" }, { 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.6" 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/2a/e1/e265aba384343dd8ddd3083f5e33536cd17e1566c41453a5517b5dd443be/ruff-0.9.6.tar.gz", hash = "sha256:81761592f72b620ec8fa1068a6fd00e98a5ebee342a3642efd84454f3031dca9", size = 3639454 } 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/76/e3/3d2c022e687e18cf5d93d6bfa2722d46afc64eaa438c7fbbdd603b3597be/ruff-0.9.6-py3-none-linux_armv6l.whl", hash = "sha256:2f218f356dd2d995839f1941322ff021c72a492c470f0b26a34f844c29cdf5ba", size = 11714128 }, + { url = "https://files.pythonhosted.org/packages/e1/22/aff073b70f95c052e5c58153cba735748c9e70107a77d03420d7850710a0/ruff-0.9.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b908ff4df65dad7b251c9968a2e4560836d8f5487c2f0cc238321ed951ea0504", size = 11682539 }, + { url = "https://files.pythonhosted.org/packages/75/a7/f5b7390afd98a7918582a3d256cd3e78ba0a26165a467c1820084587cbf9/ruff-0.9.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b109c0ad2ececf42e75fa99dc4043ff72a357436bb171900714a9ea581ddef83", size = 11132512 }, + { url = "https://files.pythonhosted.org/packages/a6/e3/45de13ef65047fea2e33f7e573d848206e15c715e5cd56095589a7733d04/ruff-0.9.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1de4367cca3dac99bcbd15c161404e849bb0bfd543664db39232648dc00112dc", size = 11929275 }, + { url = "https://files.pythonhosted.org/packages/7d/f2/23d04cd6c43b2e641ab961ade8d0b5edb212ecebd112506188c91f2a6e6c/ruff-0.9.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac3ee4d7c2c92ddfdaedf0bf31b2b176fa7aa8950efc454628d477394d35638b", size = 11466502 }, + { url = "https://files.pythonhosted.org/packages/b5/6f/3a8cf166f2d7f1627dd2201e6cbc4cb81f8b7d58099348f0c1ff7b733792/ruff-0.9.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5dc1edd1775270e6aa2386119aea692039781429f0be1e0949ea5884e011aa8e", size = 12676364 }, + { url = "https://files.pythonhosted.org/packages/f5/c4/db52e2189983c70114ff2b7e3997e48c8318af44fe83e1ce9517570a50c6/ruff-0.9.6-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:4a091729086dffa4bd070aa5dab7e39cc6b9d62eb2bef8f3d91172d30d599666", size = 13335518 }, + { url = "https://files.pythonhosted.org/packages/66/44/545f8a4d136830f08f4d24324e7db957c5374bf3a3f7a6c0bc7be4623a37/ruff-0.9.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d1bbc6808bf7b15796cef0815e1dfb796fbd383e7dbd4334709642649625e7c5", size = 12823287 }, + { url = "https://files.pythonhosted.org/packages/c5/26/8208ef9ee7431032c143649a9967c3ae1aae4257d95e6f8519f07309aa66/ruff-0.9.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:589d1d9f25b5754ff230dce914a174a7c951a85a4e9270613a2b74231fdac2f5", size = 14592374 }, + { url = "https://files.pythonhosted.org/packages/31/70/e917781e55ff39c5b5208bda384fd397ffd76605e68544d71a7e40944945/ruff-0.9.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc61dd5131742e21103fbbdcad683a8813be0e3c204472d520d9a5021ca8b217", size = 12500173 }, + { url = "https://files.pythonhosted.org/packages/84/f5/e4ddee07660f5a9622a9c2b639afd8f3104988dc4f6ba0b73ffacffa9a8c/ruff-0.9.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:5e2d9126161d0357e5c8f30b0bd6168d2c3872372f14481136d13de9937f79b6", size = 11906555 }, + { url = "https://files.pythonhosted.org/packages/f1/2b/6ff2fe383667075eef8656b9892e73dd9b119b5e3add51298628b87f6429/ruff-0.9.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:68660eab1a8e65babb5229a1f97b46e3120923757a68b5413d8561f8a85d4897", size = 11538958 }, + { url = "https://files.pythonhosted.org/packages/3c/db/98e59e90de45d1eb46649151c10a062d5707b5b7f76f64eb1e29edf6ebb1/ruff-0.9.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c4cae6c4cc7b9b4017c71114115db0445b00a16de3bcde0946273e8392856f08", size = 12117247 }, + { url = "https://files.pythonhosted.org/packages/ec/bc/54e38f6d219013a9204a5a2015c09e7a8c36cedcd50a4b01ac69a550b9d9/ruff-0.9.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:19f505b643228b417c1111a2a536424ddde0db4ef9023b9e04a46ed8a1cb4656", size = 12554647 }, + { url = "https://files.pythonhosted.org/packages/a5/7d/7b461ab0e2404293c0627125bb70ac642c2e8d55bf590f6fce85f508f1b2/ruff-0.9.6-py3-none-win32.whl", hash = "sha256:194d8402bceef1b31164909540a597e0d913c0e4952015a5b40e28c146121b5d", size = 9949214 }, + { url = "https://files.pythonhosted.org/packages/ee/30/c3cee10f915ed75a5c29c1e57311282d1a15855551a64795c1b2bbe5cf37/ruff-0.9.6-py3-none-win_amd64.whl", hash = "sha256:03482d5c09d90d4ee3f40d97578423698ad895c87314c4de39ed2af945633caa", size = 10999914 }, + { url = "https://files.pythonhosted.org/packages/e8/a8/d71f44b93e3aa86ae232af1f2126ca7b95c0f515ec135462b3e1f351441c/ruff-0.9.6-py3-none-win_arm64.whl", hash = "sha256:0e2bb706a2be7ddfea4a4af918562fdc1bcb16df255e5fa595bbd800ce322a5a", size = 10177499 }, ] [[package]] diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 24a6572d0..865174e94 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -40,7 +40,7 @@ repos: # Run the Ruff linter. - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.4 + rev: v0.9.6 hooks: # Linter - id: ruff 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 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 diff --git a/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile index 9c66f69c2..d87f3c4c1 100644 --- a/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/amazon/aws-cli:2.23.0 +FROM docker.io/amazon/aws-cli:2.24.0 # Clear entrypoint from the base image, otherwise it's always calling the aws CLI ENTRYPOINT [] diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 570726f13..0e1d767f2 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} @@ -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 @@ -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 diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index aa65c9d1f..84d6b49c6 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -337,13 +337,15 @@ 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 = "email" +ACCOUNT_LOGIN_METHODS = {"{{cookiecutter.username_type}}"} # https://docs.allauth.org/en/latest/account/configuration.html ACCOUNT_EMAIL_REQUIRED = True +{%- if cookiecutter.username_type == "email" %} # https://docs.allauth.org/en/latest/account/configuration.html ACCOUNT_USERNAME_REQUIRED = False # https://docs.allauth.org/en/latest/account/configuration.html ACCOUNT_USER_MODEL_USERNAME_FIELD = None +{%- endif %} # https://docs.allauth.org/en/latest/account/configuration.html ACCOUNT_EMAIL_VERIFICATION = "mandatory" # https://docs.allauth.org/en/latest/account/configuration.html diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index e59c48b92..f0f42d516 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" %} @@ -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' %} @@ -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 %} diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 7e10b9c1a..f51115d75 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,8 +13,8 @@ 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 +mypy==1.15.0 # https://github.com/python/mypy +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" %} @@ -29,8 +29,8 @@ sphinx-rtd-theme==2.0.0 # https://pypi.org/project/sphinx-rtd-theme/ # Code quality # ------------------------------------------------------------------------------ -ruff==0.9.4 # https://github.com/astral-sh/ruff -coverage==7.6.10 # https://github.com/nedbat/coveragepy +ruff==0.9.6 # https://github.com/astral-sh/ruff +coverage==7.6.11 # 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 @@ -41,4 +41,4 @@ factory-boy==3.3.2 # https://github.com/FactoryBoy/factory_boy django-debug-toolbar==5.0.1 # https://github.com/jazzband/django-debug-toolbar django-extensions==3.2.3 # https://github.com/django-extensions/django-extensions django-coverage-plugin==3.1.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==4.9.0 # https://github.com/pytest-dev/pytest-django +pytest-django==4.10.0 # https://github.com/pytest-dev/pytest-django