diff --git a/.github/contributors.json b/.github/contributors.json
index 15e7b84ba..b135fe90f 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": ""
}
]
\ No newline at end of file
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 d8d601e92..21b4ff216 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -47,6 +47,11 @@ repos:
hooks:
- id: flake8
+ - repo: https://github.com/tox-dev/pyproject-fmt
+ rev: "2.2.3"
+ hooks:
+ - id: pyproject-fmt
+
ci:
autoupdate_schedule: weekly
skip: []
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a207749fa..aedb99d90 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,52 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
+## 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
+
+
+### Updated
+
+- Update django-upgrade to 1.21.0 ([#5348](https://github.com/cookiecutter/cookiecutter-django/pull/5348))
+
+## 2024.09.04
+
+
+### Updated
+
+- Update django-model-utils to 5.0.0 ([#5343](https://github.com/cookiecutter/cookiecutter-django/pull/5343))
+
## 2024.09.03
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 75f2d832d..b913b67f3 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -1468,6 +1468,13 @@ Listed in alphabetical order.
Ryan Fitch |
diff --git a/pyproject.toml b/pyproject.toml
index 6e68762f7..70e15a616 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,35 +1,68 @@
-# ==== pytest ====
-[tool.pytest.ini_options]
-addopts = "-v --tb=short"
-norecursedirs = [
- ".tox",
- ".git",
- "*/migrations/*",
- "*/static/*",
- "docs",
- "venv",
- "*/{{cookiecutter.project_slug}}/*",
+[project]
+name = "cookiecutter-django"
+version = "2024.09.09"
+description = "A Cookiecutter template for creating production-ready Django projects quickly."
+readme = "README.md"
+keywords = [
+ "cookiecutter",
+ "django",
+ "project template",
+ "scaffolding",
+ "skeleton",
]
+license = { text = "BSD" }
+authors = [
+ { name = "Daniel Roy Greenfeld", email = "pydanny@gmail.com" },
+]
+requires-python = ">=3.12"
+classifiers = [
+ "Development Status :: 4 - Beta",
+ "Environment :: Console",
+ "Framework :: Django :: 5.0",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: BSD License",
+ "Natural Language :: English",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Topic :: Software Development",
+]
+urls = { Repository = "https://github.com/cookiecutter/cookiecutter-django" }
-
-# ==== black ====
[tool.black]
line-length = 119
-target-version = ['py312']
-
+target-version = [
+ 'py312',
+]
# ==== isort ====
+
[tool.isort]
profile = "black"
line_length = 119
known_first_party = [
- "tests",
- "scripts",
- "hooks",
+ "tests",
+ "scripts",
+ "hooks",
]
-
# ==== djLint ====
+
+[tool.pytest.ini_options]
+addopts = "-v --tb=short"
+norecursedirs = [
+ ".tox",
+ ".git",
+ "*/migrations/*",
+ "*/static/*",
+ "docs",
+ "venv",
+ "*/{{cookiecutter.project_slug}}/*",
+]
+
+# ==== black ====
+
[tool.djlint]
blank_line_after_tag = "load,extends"
close_void_tags = true
diff --git a/requirements.txt b/requirements.txt
index 6425ccde1..e3fa7a89c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,14 +4,14 @@ binaryornot==0.4.4
# Code quality
# ------------------------------------------------------------------------------
-ruff==0.6.3
-django-upgrade==1.20.0
+ruff==0.6.4
+django-upgrade==1.21.0
djlint==1.35.2
pre-commit==3.8.0
# Testing
# ------------------------------------------------------------------------------
-tox==4.18.0
+tox==4.18.1
pytest==8.3.2
pytest-xdist==3.6.1
pytest-cookies==0.7.0
diff --git a/scripts/update_changelog.py b/scripts/update_changelog.py
index 5f3ad5ec3..988370e43 100644
--- a/scripts/update_changelog.py
+++ b/scripts/update_changelog.py
@@ -47,7 +47,7 @@ def main() -> None:
print(f"Wrote {changelog_path}")
# Update version
- setup_py_path = ROOT / "setup.py"
+ setup_py_path = ROOT / "pyproject.toml"
update_version(setup_py_path, release)
print(f"Updated version in {setup_py_path}")
@@ -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 7bd694e58..000000000
--- a/setup.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-try:
- from setuptools import setup
-except ImportError:
- from distutils.core import setup
-
-# We use calendar versioning
-version = "2024.09.03"
-
-with open("README.md") as readme_file:
- long_description = readme_file.read()
-
-setup(
- name="cookiecutter-django",
- version=version,
- description=("A Cookiecutter template for creating production-ready " "Django projects quickly."),
- long_description=long_description,
- author="Daniel Roy Greenfeld",
- author_email="pydanny@gmail.com",
- url="https://github.com/cookiecutter/cookiecutter-django",
- packages=[],
- license="BSD",
- zip_safe=False,
- classifiers=[
- "Development Status :: 4 - Beta",
- "Environment :: Console",
- "Framework :: Django :: 5.0",
- "Intended Audience :: Developers",
- "Natural Language :: English",
- "License :: OSI Approved :: BSD License",
- "Programming Language :: Python",
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.12",
- "Programming Language :: Python :: Implementation :: CPython",
- "Topic :: Software Development",
- ],
- keywords=(
- "cookiecutter, Python, projects, project templates, django, "
- "skeleton, scaffolding, project directory, setup.py"
- ),
-)
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}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml
index 2f1e42828..8bbcf3856 100644
--- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml
+++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml
@@ -28,14 +28,14 @@ repos:
exclude: '{{cookiecutter.project_slug}}/templates/'
- repo: https://github.com/adamchainz/django-upgrade
- rev: '1.20.0'
+ rev: '1.21.0'
hooks:
- id: django-upgrade
args: ['--target-version', '5.0']
# Run the Ruff linter.
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.6.3
+ rev: v0.6.4
hooks:
# Linter
- id: ruff
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/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt
index cab2fa5d3..7ea91c806 100644
--- a/{{cookiecutter.project_slug}}/requirements/base.txt
+++ b/{{cookiecutter.project_slug}}/requirements/base.txt
@@ -32,7 +32,7 @@ uvicorn-worker==0.2.0 # https://github.com/Kludex/uvicorn-worker
django==5.0.9 # pyup: < 5.1 # https://www.djangoproject.com/
django-environ==0.11.2 # https://github.com/joke2k/django-environ
django-model-utils==5.0.0 # https://github.com/jazzband/django-model-utils
-django-allauth[mfa]==64.2.0 # https://github.com/pennersr/django-allauth
+django-allauth[mfa]==64.2.1 # https://github.com/pennersr/django-allauth
django-crispy-forms==2.3 # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5==2024.2 # https://github.com/django-crispy-forms/crispy-bootstrap5
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt
index 864fad447..6fd60ca39 100644
--- a/{{cookiecutter.project_slug}}/requirements/local.txt
+++ b/{{cookiecutter.project_slug}}/requirements/local.txt
@@ -29,7 +29,7 @@ sphinx-autobuild==2024.9.3 # https://github.com/GaretJax/sphinx-autobuild
# Code quality
# ------------------------------------------------------------------------------
-ruff==0.6.3 # https://github.com/astral-sh/ruff
+ruff==0.6.4 # https://github.com/astral-sh/ruff
coverage==7.6.1 # https://github.com/nedbat/coveragepy
djlint==1.35.2 # https://github.com/Riverside-Healthcare/djLint
pre-commit==3.8.0 # https://github.com/pre-commit/pre-commit
diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt
index 824927ca6..ce52c2e01 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
|