diff --git a/.github/contributors.json b/.github/contributors.json index c4ad89449..50b2820f7 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1628,5 +1628,15 @@ "name": "Will", "github_login": "novucs", "twitter_username": "" + }, + { + "name": "rxm7706", + "github_login": "rxm7706", + "twitter_username": "" + }, + { + "name": "Marlon Castillo", + "github_login": "mcastle", + "twitter_username": "" } ] diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3582a2125..c5856a6ab 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ # Config for Dependabot updates. See Documentation here: -# https://docs.github.com/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file version: 2 updates: @@ -96,6 +96,13 @@ updates: labels: - "update" + - package-ecosystem: "docker" + directory: "{{cookiecutter.project_slug}}/compose/production/nginx/" + schedule: + interval: "daily" + labels: + - "update" + - package-ecosystem: "docker" directory: "{{cookiecutter.project_slug}}/compose/production/traefik/" schedule: diff --git a/.github/workflows/issue-manager.yml b/.github/workflows/issue-manager.yml index 103612cfe..42579d06e 100644 --- a/.github/workflows/issue-manager.yml +++ b/.github/workflows/issue-manager.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: tiangolo/issue-manager@0.5.0 + - uses: tiangolo/issue-manager@0.5.1 with: token: ${{ secrets.GITHUB_TOKEN }} config: > diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 06c073565..21b4ff216 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - id: flake8 - repo: https://github.com/tox-dev/pyproject-fmt - rev: "2.0.4" + rev: "2.2.3" hooks: - id: pyproject-fmt diff --git a/CHANGELOG.md b/CHANGELOG.md index a8ba79a48..3c5eacfc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,68 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2024.09.11 + + +### Updated + +- Update djangorestframework-stubs to 3.15.1 ([#5372](https://github.com/cookiecutter/cookiecutter-django/pull/5372)) + +- Update django-anymail to 12.0 ([#5366](https://github.com/cookiecutter/cookiecutter-django/pull/5366)) + +## 2024.09.10 + + +### Changed + +- Add nginx container to dependabot automation ([#5345](https://github.com/cookiecutter/cookiecutter-django/pull/5345)) + +### Updated + +- Update pytest to 8.3.3 ([#5371](https://github.com/cookiecutter/cookiecutter-django/pull/5371)) + +- Bump postcss-preset-env from 9.6.0 to 10.0.3 ([#5368](https://github.com/cookiecutter/cookiecutter-django/pull/5368)) + +- Bump concurrently from 8.2.2 to 9.0.0 ([#5363](https://github.com/cookiecutter/cookiecutter-django/pull/5363)) + +- Bump python to 3.12.6 in local Docker ([#5370](https://github.com/cookiecutter/cookiecutter-django/pull/5370)) + +- Bump python to 3.12.6 in production Docker ([#5367](https://github.com/cookiecutter/cookiecutter-django/pull/5367)) + +- Bump python to 3.12.6 in docs Docker image ([#5369](https://github.com/cookiecutter/cookiecutter-django/pull/5369)) + +## 2024.09.09 + + +### Updated + +- Update sentry-sdk to 2.14.0 ([#5365](https://github.com/cookiecutter/cookiecutter-django/pull/5365)) + +## 2024.09.08 + + +### Changed + +- Remove "storages" from `INSTALLED_APPS` ([#5361](https://github.com/cookiecutter/cookiecutter-django/pull/5361)) + +## 2024.09.07 + + +### Changed + +- Fix Requires Python to allow minor versions ([#5360](https://github.com/cookiecutter/cookiecutter-django/pull/5360)) + +## 2024.09.06 + + +### Updated + +- Update ruff to 0.6.4 ([#5354](https://github.com/cookiecutter/cookiecutter-django/pull/5354)) + +- Update django-allauth to 64.2.1 ([#5352](https://github.com/cookiecutter/cookiecutter-django/pull/5352)) + +- Auto-update pre-commit hooks ([#5353](https://github.com/cookiecutter/cookiecutter-django/pull/5353)) + ## 2024.09.05 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 5010bf32f..a19e230b2 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1468,6 +1468,13 @@ Listed in alphabetical order. + + Marlon Castillo + + mcastle + + + Martin Blech @@ -1923,6 +1930,13 @@ Listed in alphabetical order. + + rxm7706 + + rxm7706 + + + Ryan Fitch diff --git a/pyproject.toml b/pyproject.toml index 04d40a217..f3790af07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cookiecutter-django" -version = "2024.09.05" +version = "2024.09.11" description = "A Cookiecutter template for creating production-ready Django projects quickly." readme = "README.md" keywords = [ @@ -14,7 +14,7 @@ license = { text = "BSD" } authors = [ { name = "Daniel Roy Greenfeld", email = "pydanny@gmail.com" }, ] -requires-python = "==3.12" +requires-python = ">=3.12" classifiers = [ "Development Status :: 4 - Beta", "Environment :: Console", diff --git a/requirements.txt b/requirements.txt index 67e61da56..1aafc7064 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,8 +11,8 @@ pre-commit==3.8.0 # Testing # ------------------------------------------------------------------------------ -tox==4.18.0 -pytest==8.3.2 +tox==4.18.1 +pytest==8.3.3 pytest-xdist==3.6.1 pytest-cookies==0.7.0 pytest-instafail==0.5.0 diff --git a/scripts/update_changelog.py b/scripts/update_changelog.py index 9909b1eee..988370e43 100644 --- a/scripts/update_changelog.py +++ b/scripts/update_changelog.py @@ -124,7 +124,7 @@ def write_changelog(file_path: Path, release: str, content: str) -> None: def update_version(file_path: Path, release: str) -> None: - """Update template version in setup.py.""" + """Update template version in pyproject.toml.""" old_content = file_path.read_text() updated_content = re.sub( r'\nversion = "\d+\.\d+\.\d+"\n', diff --git a/setup.py b/setup.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tox.ini b/tox.ini index 3b7a95088..a1034eb3d 100644 --- a/tox.ini +++ b/tox.ini @@ -9,4 +9,4 @@ commands = pytest -n auto {posargs:./tests} [testenv:black-template] deps = black -commands = black --check hooks tests setup.py docs scripts +commands = black --check hooks tests docs scripts diff --git a/{{cookiecutter.project_slug}}/.github/dependabot.yml b/{{cookiecutter.project_slug}}/.github/dependabot.yml index be52c68d5..4b8973558 100644 --- a/{{cookiecutter.project_slug}}/.github/dependabot.yml +++ b/{{cookiecutter.project_slug}}/.github/dependabot.yml @@ -1,5 +1,5 @@ # Config for Dependabot updates. See Documentation here: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file version: 2 updates: @@ -83,6 +83,16 @@ updates: schedule: interval: 'daily' +{%- if cookiecutter.cloud_provider == 'None' %} + + - package-ecosystem: 'docker' + # Look for a `Dockerfile` in the `compose/production/nginx` directory + directory: 'compose/production/nginx/' + # Every weekday + schedule: + interval: 'daily' +{%- endif %} + {%- endif %} # Enable version updates for Python/Pip - Production diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index ddec2d4e7..fbb62e239 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.5-slim-bookworm AS python +FROM docker.io/python:3.12.6-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 49e25cba9..ed1b1dd2a 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.5-slim-bookworm AS python +FROM docker.io/python:3.12.6-slim-bookworm AS python # Python build stage diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 3e0859c24..86aae67d5 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.5-slim-bookworm AS python +FROM docker.io/python:3.12.6-slim-bookworm AS python # Python build stage FROM python AS python-build-stage diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 706d04e0a..034d588e0 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -78,12 +78,6 @@ SECURE_CONTENT_TYPE_NOSNIFF = env.bool( default=True, ) -{% if cookiecutter.cloud_provider != 'None' -%} -# STORAGES -# ------------------------------------------------------------------------------ -# https://django-storages.readthedocs.io/en/latest/#installation -INSTALLED_APPS += ["storages"] -{%- endif -%} {% if cookiecutter.cloud_provider == 'AWS' %} # https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings AWS_ACCESS_KEY_ID = env("DJANGO_AWS_ACCESS_KEY_ID") diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index a93b3fa5f..94861c4eb 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -11,7 +11,7 @@ "browser-sync": "^3.0.2", "css-loader": "^7.1.2", "gulp-concat": "^2.6.1", - "concurrently": "^8.0.1", + "concurrently": "^9.0.0", "cssnano": "^7.0.0", "gulp": "^4.0.2", "gulp-imagemin": "^7.1.0", @@ -25,7 +25,7 @@ "pixrem": "^5.0.0", "postcss": "^8.3.11", "postcss-loader": "^8.0.0", - "postcss-preset-env": "^9.0.0", + "postcss-preset-env": "^10.0.3", "sass": "^1.43.4", "sass-loader": "^16.0.1", "webpack": "^5.65.0", diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index c9e4a775c..094d68270 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -16,10 +16,10 @@ watchfiles==0.24.0 # https://github.com/samuelcolvin/watchfiles # ------------------------------------------------------------------------------ mypy==1.11.2 # https://github.com/python/mypy django-stubs[compatible-mypy]==5.0.4 # https://github.com/typeddjango/django-stubs -pytest==8.3.2 # https://github.com/pytest-dev/pytest +pytest==8.3.3 # https://github.com/pytest-dev/pytest pytest-sugar==1.0.0 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} -djangorestframework-stubs==3.15.0 # https://github.com/typeddjango/djangorestframework-stubs +djangorestframework-stubs==3.15.1 # https://github.com/typeddjango/djangorestframework-stubs {%- endif %} # Documentation diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 824927ca6..f65a4b29e 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg[c]==3.2.1 # https://github.com/psycopg/psycopg Collectfasta==3.2.0 # https://github.com/jasongi/collectfasta {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==2.13.0 # https://github.com/getsentry/sentry-python +sentry-sdk==2.14.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==3.0.0 # https://github.com/redis/hiredis-py @@ -24,21 +24,21 @@ django-storages[google]==1.14.4 # https://github.com/jschneier/django-storages django-storages[azure]==1.14.4 # https://github.com/jschneier/django-storages {%- endif %} {%- if cookiecutter.mail_service == 'Mailgun' %} -django-anymail[mailgun]==11.1 # https://github.com/anymail/django-anymail +django-anymail[mailgun]==12.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Amazon SES' %} -django-anymail[amazon-ses]==11.1 # https://github.com/anymail/django-anymail +django-anymail[amazon-ses]==12.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Mailjet' %} -django-anymail[mailjet]==11.1 # https://github.com/anymail/django-anymail +django-anymail[mailjet]==12.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Mandrill' %} -django-anymail[mandrill]==11.1 # https://github.com/anymail/django-anymail +django-anymail[mandrill]==12.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Postmark' %} -django-anymail[postmark]==11.1 # https://github.com/anymail/django-anymail +django-anymail[postmark]==12.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Sendgrid' %} -django-anymail[sendgrid]==11.1 # https://github.com/anymail/django-anymail +django-anymail[sendgrid]==12.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Brevo' %} -django-anymail[brevo]==11.1 # https://github.com/anymail/django-anymail +django-anymail[brevo]==12.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'SparkPost' %} -django-anymail[sparkpost]==11.1 # https://github.com/anymail/django-anymail +django-anymail[sparkpost]==12.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Other SMTP' %} -django-anymail==11.1 # https://github.com/anymail/django-anymail +django-anymail==12.0 # https://github.com/anymail/django-anymail {%- endif %}