From cc2d8d2d7fd6e5f53128096e0d692c97ed72ab96 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 10 Jul 2023 15:05:21 -0500 Subject: [PATCH 01/43] Update gitpython from 3.1.31 to 3.1.32 (#4451) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0611653ba..869d38b57 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,6 +23,6 @@ pyyaml==6.0 # Scripting # ------------------------------------------------------------------------------ PyGithub==1.59.0 -gitpython==3.1.31 +gitpython==3.1.32 jinja2==3.1.2 requests==2.31.0 From 63000d999e7c2dd3c43ea565ec6f1fa1f46c69ba Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 11 Jul 2023 02:30:07 +0000 Subject: [PATCH 02/43] Release 2023.07.10 --- CHANGELOG.md | 23 +++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eca73d002..e6997fdbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,29 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.10 + + +### Fixed + +- Prevent user's name being shown twice on user details page if username is set to email ([#4436](https://github.com/cookiecutter/cookiecutter-django/pull/4436)) + +- Add missing trailing space in `EMAIL_SUBJECT_PREFIX` setting ([#4434](https://github.com/cookiecutter/cookiecutter-django/pull/4434)) + +### Documentation + +- Clarify documentation on which port to use to access the application when using Webpack or Gulp ([#4413](https://github.com/cookiecutter/cookiecutter-django/pull/4413)) + +### Updated + +- Update django-coverage-plugin to 3.1.0 ([#4446](https://github.com/cookiecutter/cookiecutter-django/pull/4446)) + +- Update pillow to 10.0.0 ([#4432](https://github.com/cookiecutter/cookiecutter-django/pull/4432)) + +- Update django-cors-headers to 4.2.0 ([#4445](https://github.com/cookiecutter/cookiecutter-django/pull/4445)) + +- Update sentry-sdk to 1.28.0 ([#4444](https://github.com/cookiecutter/cookiecutter-django/pull/4444)) + ## 2023.07.09 diff --git a/setup.py b/setup.py index dc7ee0ea4..3fd118de4 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.09" +version = "2023.07.10" with open("README.rst") as readme_file: long_description = readme_file.read() From cf2bc57a0d008665d776e1b72b8d29dc7d6bbf56 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 11 Jul 2023 02:43:53 -0500 Subject: [PATCH 03/43] Update black to 23.7.0 (#4452) * Update black from 23.3.0 to 23.7.0 * Update black from 23.3.0 to 23.7.0 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 869d38b57..4fa781e57 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ -black==23.3.0 +black==23.7.0 isort==5.12.0 flake8==6.0.0 django-upgrade==1.14.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 0d16027df..1f7c1501f 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -31,7 +31,7 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild flake8==6.0.0 # https://github.com/PyCQA/flake8 flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort coverage==7.2.7 # https://github.com/nedbat/coveragepy -black==23.3.0 # https://github.com/psf/black +black==23.7.0 # https://github.com/psf/black djlint==1.31.1 # https://github.com/Riverside-Healthcare/djLint pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From a78f2738465180c9c17a2cf447453eb418ec06eb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 11 Jul 2023 09:48:05 +0200 Subject: [PATCH 04/43] [pre-commit.ci] pre-commit autoupdate (#4453) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.9-for-vscode → v3.0.0](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.9-for-vscode...v3.0.0) - [github.com/asottile/pyupgrade: v3.8.0 → v3.9.0](https://github.com/asottile/pyupgrade/compare/v3.8.0...v3.9.0) - [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3acfca53d..26f80b163 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,20 +17,20 @@ repos: - id: detect-private-key - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.0-alpha.9-for-vscode" + rev: "v3.0.0" hooks: - id: prettier args: ["--tab-width", "2"] - repo: https://github.com/asottile/pyupgrade - rev: v3.8.0 + rev: v3.9.0 hooks: - id: pyupgrade args: [--py311-plus] exclude: hooks/ - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black From 67a7194d06d45a2aa87840c5e5ebefeda86c9325 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 11 Jul 2023 15:11:24 +0200 Subject: [PATCH 05/43] Improve type hints for `UserSerializer` (#4429) * Improve type hints for UserSerializer * Fix NameError for UserType --- .../{{cookiecutter.project_slug}}/users/api/serializers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/api/serializers.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/api/serializers.py index 6b26367d0..0872d06f4 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/api/serializers.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/api/serializers.py @@ -1,10 +1,13 @@ from django.contrib.auth import get_user_model from rest_framework import serializers +from {{ cookiecutter.project_slug }}.users.models import User as UserType + + User = get_user_model() -class UserSerializer(serializers.ModelSerializer): +class UserSerializer(serializers.ModelSerializer[UserType]): class Meta: model = User {%- if cookiecutter.username_type == "email" %} From f10253a3b3645d9b2629bc1cd8cecd1cefd1467f Mon Sep 17 00:00:00 2001 From: masavini Date: Tue, 11 Jul 2023 18:32:02 +0200 Subject: [PATCH 06/43] fix /tmp bind mount (#4455) --- {{cookiecutter.project_slug}}/.devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json b/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json index c11b8dd9a..6ec731ce5 100644 --- a/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json +++ b/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json @@ -12,7 +12,7 @@ "type": "bind" }, { - "source": "~/.ssh", + "source": "/tmp", "target": "/tmp", "type": "bind" }, From 4d59d69fee50b29469f980cbc8b73f9212e2f02b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 11 Jul 2023 12:32:02 -0500 Subject: [PATCH 07/43] Update cookiecutter to 2.2.3 (#4456) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4fa781e57..48f5f54fc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cookiecutter==2.2.2 +cookiecutter==2.2.3 sh==2.0.4; sys_platform != "win32" binaryornot==0.4.4 From b907404466f7801ada1d5956a0b3d5b414fdbc30 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 12 Jul 2023 02:32:23 +0000 Subject: [PATCH 08/43] Release 2023.07.11 --- CHANGELOG.md | 17 +++++++++++++++++ setup.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6997fdbd..ca9aab4b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.11 + + +### Changed + +- Improve type hints for `UserSerializer` ([#4429](https://github.com/cookiecutter/cookiecutter-django/pull/4429)) + +- [pre-commit.ci] pre-commit autoupdate ([#4453](https://github.com/cookiecutter/cookiecutter-django/pull/4453)) + +### Fixed + +- Fix `/tmp` bind mount in devcontainer config ([#4455](https://github.com/cookiecutter/cookiecutter-django/pull/4455)) + +### Updated + +- Update black to 23.7.0 ([#4452](https://github.com/cookiecutter/cookiecutter-django/pull/4452)) + ## 2023.07.10 diff --git a/setup.py b/setup.py index 3fd118de4..2e0f6c235 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.10" +version = "2023.07.11" with open("README.rst") as readme_file: long_description = readme_file.read() From de2f108ec2f290f85ecc70d72ecf2c6736db7ea8 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 12 Jul 2023 11:03:05 +0100 Subject: [PATCH 09/43] Fix code style --- {{cookiecutter.project_slug}}/config/settings/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index c9feedea1..f02d476c1 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -252,7 +252,7 @@ ADMINS = [("""{{cookiecutter.author_name}}""", "{{cookiecutter.email}}")] MANAGERS = ADMINS # https://cookiecutter-django.readthedocs.io/en/latest/settings.html#other-environment-settings # Force the `admin` sign in process to go through the `django-allauth` workflow -DJANGO_ADMIN_FORCE_ALLAUTH = env.bool('DJANGO_ADMIN_FORCE_ALLAUTH', default=False) +DJANGO_ADMIN_FORCE_ALLAUTH = env.bool("DJANGO_ADMIN_FORCE_ALLAUTH", default=False) # LOGGING # ------------------------------------------------------------------------------ From 1cfa07be3bb2b2147e0a19d9b6e6427ebb8d8aa0 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 13 Jul 2023 07:26:56 -0500 Subject: [PATCH 10/43] Update sentry-sdk from 1.28.0 to 1.28.1 (#4458) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 409f9c2ef..537f081f5 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.28.0 # https://github.com/getsentry/sentry-python +sentry-sdk==1.28.1 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py From 69505fb7d6b709d9e030f785eb30f263623e0840 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 14 Jul 2023 02:33:10 +0000 Subject: [PATCH 11/43] Release 2023.07.13 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca9aab4b7..0fb659aaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.13 + + +### Updated + +- Update sentry-sdk to 1.28.1 ([#4458](https://github.com/cookiecutter/cookiecutter-django/pull/4458)) + ## 2023.07.11 diff --git a/setup.py b/setup.py index 2e0f6c235..c64011e68 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.11" +version = "2023.07.13" with open("README.rst") as readme_file: long_description = readme_file.read() From daa4398071c1abaef6075e377ab49aa8794165f4 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 18 Jul 2023 06:40:06 -0500 Subject: [PATCH 12/43] Update gunicorn to 21.0.1 (#4466) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 537f081f5..9130241f2 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -2,7 +2,7 @@ -r base.txt -gunicorn==20.1.0 # https://github.com/benoitc/gunicorn +gunicorn==21.0.1 # https://github.com/benoitc/gunicorn psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==2.2.0 # https://github.com/antonagestam/collectfast From 89e2889672600952e66df51c4976ff04931ee489 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 18 Jul 2023 06:40:31 -0500 Subject: [PATCH 13/43] Update pyyaml to 6.0.1 (#4467) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 48f5f54fc..a204a5b1b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ pytest==7.4.0 pytest-xdist==3.3.1 pytest-cookies==0.7.0 pytest-instafail==0.5.0 -pyyaml==6.0 +pyyaml==6.0.1 # Scripting # ------------------------------------------------------------------------------ From 75a33485a36abee234369e40627d3e96b8f17de9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 18 Jul 2023 06:40:58 -0500 Subject: [PATCH 14/43] Update uvicorn to 0.23.1 (#4468) --- {{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 64eca4f52..c9813f25d 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -23,7 +23,7 @@ flower==2.0.0 # https://github.com/mher/flower {%- endif %} {%- endif %} {%- if cookiecutter.use_async == 'y' %} -uvicorn[standard]==0.22.0 # https://github.com/encode/uvicorn +uvicorn[standard]==0.23.1 # https://github.com/encode/uvicorn {%- endif %} # Django From 826c48c80e74cdd8c694ed1dd75135b47390c412 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 18 Jul 2023 11:56:19 -0500 Subject: [PATCH 15/43] Update gunicorn to 21.1.0 (#4470) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 9130241f2..150bacfde 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -2,7 +2,7 @@ -r base.txt -gunicorn==21.0.1 # https://github.com/benoitc/gunicorn +gunicorn==21.1.0 # https://github.com/benoitc/gunicorn psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==2.2.0 # https://github.com/antonagestam/collectfast From da697eb7ec696cf1ecd29518072db90c1d93320a Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 19 Jul 2023 03:01:03 +0000 Subject: [PATCH 16/43] Release 2023.07.18 --- CHANGELOG.md | 11 +++++++++++ setup.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fb659aaa..c985e8571 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.18 + + +### Updated + +- Update gunicorn to 21.1.0 ([#4470](https://github.com/cookiecutter/cookiecutter-django/pull/4470)) + +- Update uvicorn to 0.23.1 ([#4468](https://github.com/cookiecutter/cookiecutter-django/pull/4468)) + +- Update gunicorn to 21.0.1 ([#4466](https://github.com/cookiecutter/cookiecutter-django/pull/4466)) + ## 2023.07.13 diff --git a/setup.py b/setup.py index c64011e68..c44370440 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.13" +version = "2023.07.18" with open("README.rst") as readme_file: long_description = readme_file.read() From 7ef435d0c6fa9467636bf1da54851578d9d533b9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 19 Jul 2023 05:06:13 -0500 Subject: [PATCH 17/43] Update djlint to 1.32.0 (#4471) * Update djlint from 1.31.1 to 1.32.0 * Update djlint from 1.31.1 to 1.32.0 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index a204a5b1b..e4fdb1e14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ black==23.7.0 isort==5.12.0 flake8==6.0.0 django-upgrade==1.14.0 -djlint==1.31.1 +djlint==1.32.0 pre-commit==3.3.3 # Testing diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 1f7c1501f..edf00ab50 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -32,7 +32,7 @@ flake8==6.0.0 # https://github.com/PyCQA/flake8 flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort coverage==7.2.7 # https://github.com/nedbat/coveragepy black==23.7.0 # https://github.com/psf/black -djlint==1.31.1 # https://github.com/Riverside-Healthcare/djLint +djlint==1.32.0 # https://github.com/Riverside-Healthcare/djLint pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery From 6b4f8852a3e2759d2dcdf1b0e3cc82db014dfdae Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 19 Jul 2023 10:52:09 -0500 Subject: [PATCH 18/43] Update gunicorn to 21.2.0 (#4473) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 150bacfde..03b75a65f 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -2,7 +2,7 @@ -r base.txt -gunicorn==21.1.0 # https://github.com/benoitc/gunicorn +gunicorn==21.2.0 # https://github.com/benoitc/gunicorn psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==2.2.0 # https://github.com/antonagestam/collectfast From 394a9c4bd88464f7bae2a6a76d84d03fcd67389b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 19 Jul 2023 10:52:30 -0500 Subject: [PATCH 19/43] Update factory-boy to 3.3.0 (#4472) --- {{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 edf00ab50..4e505b561 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -41,7 +41,7 @@ pre-commit==3.3.3 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ -factory-boy==3.2.1 # https://github.com/FactoryBoy/factory_boy +factory-boy==3.3.0 # https://github.com/FactoryBoy/factory_boy django-debug-toolbar==4.1.0 # https://github.com/jazzband/django-debug-toolbar django-extensions==3.2.3 # https://github.com/django-extensions/django-extensions From b146d7df04b01247c989c0cf400d5af0b7a05f25 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 20 Jul 2023 02:19:30 +0000 Subject: [PATCH 20/43] Release 2023.07.19 --- CHANGELOG.md | 11 +++++++++++ setup.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c985e8571..29f792977 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.19 + + +### Updated + +- Update factory-boy to 3.3.0 ([#4472](https://github.com/cookiecutter/cookiecutter-django/pull/4472)) + +- Update gunicorn to 21.2.0 ([#4473](https://github.com/cookiecutter/cookiecutter-django/pull/4473)) + +- Update djlint to 1.32.0 ([#4471](https://github.com/cookiecutter/cookiecutter-django/pull/4471)) + ## 2023.07.18 diff --git a/setup.py b/setup.py index c44370440..a724477d3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.18" +version = "2023.07.19" with open("README.rst") as readme_file: long_description = readme_file.read() From e7f0b960b724f25f0cad5bcf3d5f91e1731d8acb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 20 Jul 2023 12:38:35 -0500 Subject: [PATCH 21/43] Update djlint to 1.32.1 (#4475) * Update djlint from 1.32.0 to 1.32.1 * Update djlint from 1.32.0 to 1.32.1 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index e4fdb1e14..160e70c11 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ black==23.7.0 isort==5.12.0 flake8==6.0.0 django-upgrade==1.14.0 -djlint==1.32.0 +djlint==1.32.1 pre-commit==3.3.3 # Testing diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 4e505b561..569fd2331 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -32,7 +32,7 @@ flake8==6.0.0 # https://github.com/PyCQA/flake8 flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort coverage==7.2.7 # https://github.com/nedbat/coveragepy black==23.7.0 # https://github.com/psf/black -djlint==1.32.0 # https://github.com/Riverside-Healthcare/djLint +djlint==1.32.1 # https://github.com/Riverside-Healthcare/djLint pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery From 7664c4fb3e5a3be8f277dea073c96db12e4a979b Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 21 Jul 2023 02:20:22 +0000 Subject: [PATCH 22/43] Release 2023.07.20 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29f792977..8ee261fda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.20 + + +### Updated + +- Update djlint to 1.32.1 ([#4475](https://github.com/cookiecutter/cookiecutter-django/pull/4475)) + ## 2023.07.19 diff --git a/setup.py b/setup.py index a724477d3..6f4ec86be 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.19" +version = "2023.07.20" with open("README.rst") as readme_file: long_description = readme_file.read() From f567b5f685c0225c2402a3e90758d8cdd66d8ed1 Mon Sep 17 00:00:00 2001 From: Imran Rahman <63735892+infraredCoding@users.noreply.github.com> Date: Mon, 24 Jul 2023 15:42:51 +0600 Subject: [PATCH 23/43] update docs docker-compose -> docker compose (#4463) Co-authored-by: Imran Rahman --- .github/ISSUE_TEMPLATE/bug.md | 2 +- docs/deployment-with-docker.rst | 30 +++++++++---------- docs/developing-locally-docker.rst | 22 +++++++------- docs/docker-postgres-backups.rst | 16 +++++----- docs/document.rst | 2 +- docs/testing.rst | 6 ++-- docs/troubleshooting.rst | 6 ++-- tests/test_cookiecutter_generation.py | 6 ++-- tests/test_docker.sh | 16 +++++----- .../.github/workflows/ci.yml | 8 ++--- {{cookiecutter.project_slug}}/.gitlab-ci.yml | 8 ++--- {{cookiecutter.project_slug}}/.travis.yml | 12 ++++---- .../production/aws/maintenance/download | 2 +- .../compose/production/aws/maintenance/upload | 2 +- .../production/postgres/maintenance/backup | 2 +- .../production/postgres/maintenance/backups | 2 +- .../production/postgres/maintenance/restore | 2 +- {{cookiecutter.project_slug}}/docs/howto.rst | 18 +++++------ .../locale/README.md | 4 +-- 19 files changed, 83 insertions(+), 83 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 0e5ec12c4..da0480f1e 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -42,7 +42,7 @@ labels: bug - Python version, run `python3 -V`: - Docker version (if using Docker), run `docker --version`: - - docker-compose version (if using Docker), run `docker-compose --version`: + - docker compose version (if using Docker), run `docker compose --version`: - ... - Options selected and/or [replay file](https://cookiecutter.readthedocs.io/en/latest/advanced/replay.html): diff --git a/docs/deployment-with-docker.rst b/docs/deployment-with-docker.rst index c1b8c6d7b..3d2f9f813 100644 --- a/docs/deployment-with-docker.rst +++ b/docs/deployment-with-docker.rst @@ -1,7 +1,7 @@ Deployment with Docker ====================== -.. index:: deployment, docker, docker-compose, compose +.. index:: deployment, docker, docker compose, compose Prerequisites @@ -89,7 +89,7 @@ You can read more about this feature and how to configure it, at `Automatic HTTP Webpack without Whitenoise limitation ------------------------------------- -If you opt for Webpack without Whitenoise, Webpack needs to know the static URL at build time, when running ``docker-compose build`` (See ``webpack/prod.config.js``). Depending on your setup, this URL may come from the following environment variables: +If you opt for Webpack without Whitenoise, Webpack needs to know the static URL at build time, when running ``docker compose build`` (See ``webpack/prod.config.js``). Depending on your setup, this URL may come from the following environment variables: - ``AWS_STORAGE_BUCKET_NAME`` - ``DJANGO_AWS_S3_CUSTOM_DOMAIN`` @@ -107,7 +107,7 @@ To solve this, you can either: 2. create a ``.env`` file in the root of the project with just variables you need. You'll need to also define them in ``.envs/.production/.django`` (hence duplicating them). 3. set these variables when running the build command:: - DJANGO_AWS_S3_CUSTOM_DOMAIN=example.com docker-compose -f production.yml build``. + DJANGO_AWS_S3_CUSTOM_DOMAIN=example.com docker compose -f production.yml build``. None of these options are ideal, we're open to suggestions on how to improve this. If you think you have one, please open an issue or a pull request. @@ -122,42 +122,42 @@ Building & Running Production Stack You will need to build the stack first. To do that, run:: - docker-compose -f production.yml build + docker compose -f production.yml build Once this is ready, you can run it with:: - docker-compose -f production.yml up + docker compose -f production.yml up To run the stack and detach the containers, run:: - docker-compose -f production.yml up -d + docker compose -f production.yml up -d To run a migration, open up a second terminal and run:: - docker-compose -f production.yml run --rm django python manage.py migrate + docker compose -f production.yml run --rm django python manage.py migrate To create a superuser, run:: - docker-compose -f production.yml run --rm django python manage.py createsuperuser + docker compose -f production.yml run --rm django python manage.py createsuperuser If you need a shell, run:: - docker-compose -f production.yml run --rm django python manage.py shell + docker compose -f production.yml run --rm django python manage.py shell To check the logs out, run:: - docker-compose -f production.yml logs + docker compose -f production.yml logs If you want to scale your application, run:: - docker-compose -f production.yml up --scale django=4 - docker-compose -f production.yml up --scale celeryworker=2 + docker compose -f production.yml up --scale django=4 + docker compose -f production.yml up --scale celeryworker=2 .. warning:: don't try to scale ``postgres``, ``celerybeat``, or ``traefik``. To see how your containers are doing run:: - docker-compose -f production.yml ps + docker compose -f production.yml ps Example: Supervisor @@ -165,12 +165,12 @@ Example: Supervisor Once you are ready with your initial setup, you want to make sure that your application is run by a process manager to survive reboots and auto restarts in case of an error. You can use the process manager you are most familiar with. All -it needs to do is to run ``docker-compose -f production.yml up`` in your projects root directory. +it needs to do is to run ``docker compose -f production.yml up`` in your projects root directory. If you are using ``supervisor``, you can use this file as a starting point:: [program:{{cookiecutter.project_slug}}] - command=docker-compose -f production.yml up + command=docker compose -f production.yml up directory=/path/to/{{cookiecutter.project_slug}} redirect_stderr=true autostart=true diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 680f249dd..c205c852b 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -32,7 +32,7 @@ Build the Stack This can take a while, especially the first time you run this particular command on your development system:: - $ docker-compose -f local.yml build + $ docker compose -f local.yml build Generally, if you want to emulate production environment use ``production.yml`` instead. And this is true for any other actions you might need to perform: whenever a switch is required, just do it! @@ -51,7 +51,7 @@ This brings up both Django and PostgreSQL. The first time it is run it might tak Open a terminal at the project root and run the following for local development:: - $ docker-compose -f local.yml up + $ docker compose -f local.yml up You can also set the environment variable ``COMPOSE_FILE`` pointing to ``local.yml`` like this:: @@ -59,11 +59,11 @@ You can also set the environment variable ``COMPOSE_FILE`` pointing to ``local.y And then run:: - $ docker-compose up + $ docker compose up To run in a detached (background) mode, just:: - $ docker-compose up -d + $ docker compose up -d The site should start and be accessible at http://localhost:3000 if you selected Webpack or Gulp as frontend pipeline and http://localhost:8000 otherwise. @@ -71,10 +71,10 @@ The site should start and be accessible at http://localhost:3000 if you selected Execute Management Commands --------------------------- -As with any shell command that we wish to run in our container, this is done using the ``docker-compose -f local.yml run --rm`` command: :: +As with any shell command that we wish to run in our container, this is done using the ``docker compose -f local.yml run --rm`` command: :: - $ docker-compose -f local.yml run --rm django python manage.py migrate - $ docker-compose -f local.yml run --rm django python manage.py createsuperuser + $ docker compose -f local.yml run --rm django python manage.py migrate + $ docker compose -f local.yml run --rm django python manage.py createsuperuser Here, ``django`` is the target service we are executing the commands against. @@ -156,8 +156,8 @@ You have to modify the relevant requirement file: base, local or production by a To get this change picked up, you'll need to rebuild the image(s) and restart the running container: :: - docker-compose -f local.yml build - docker-compose -f local.yml up + docker compose -f local.yml build + docker compose -f local.yml up Debugging ~~~~~~~~~ @@ -171,7 +171,7 @@ If you are using the following within your code to debug: :: Then you may need to run the following for it to work as desired: :: - $ docker-compose -f local.yml run --rm --service-ports django + $ docker compose -f local.yml run --rm --service-ports django django-debug-toolbar @@ -316,7 +316,7 @@ You should allow the new hostname. :: Rebuild your ``docker`` application. :: - $ docker-compose -f local.yml up -d --build + $ docker compose -f local.yml up -d --build Go to your browser and type in your URL bar ``https://my-dev-env.local`` diff --git a/docs/docker-postgres-backups.rst b/docs/docker-postgres-backups.rst index 875d737eb..c40b6fd69 100644 --- a/docs/docker-postgres-backups.rst +++ b/docs/docker-postgres-backups.rst @@ -8,7 +8,7 @@ Prerequisites ------------- #. the project was generated with ``use_docker`` set to ``y``; -#. the stack is up and running: ``docker-compose -f local.yml up -d postgres``. +#. the stack is up and running: ``docker compose -f local.yml up -d postgres``. Creating a Backup @@ -16,7 +16,7 @@ Creating a Backup To create a backup, run:: - $ docker-compose -f local.yml exec postgres backup + $ docker compose -f local.yml exec postgres backup Assuming your project's database is named ``my_project`` here is what you will see: :: @@ -31,7 +31,7 @@ Viewing the Existing Backups To list existing backups, :: - $ docker-compose -f local.yml exec postgres backups + $ docker compose -f local.yml exec postgres backups These are the sample contents of ``/backups``: :: @@ -55,9 +55,9 @@ With a single backup file copied to ``.`` that would be :: $ docker cp 9c5c3f055843:/backups/backup_2018_03_13T09_05_07.sql.gz . -You can also get the container ID using ``docker-compose -f local.yml ps -q postgres`` so if you want to automate your backups, you don't have to check the container ID manually every time. Here is the full command :: +You can also get the container ID using ``docker compose -f local.yml ps -q postgres`` so if you want to automate your backups, you don't have to check the container ID manually every time. Here is the full command :: - $ docker cp $(docker-compose -f local.yml ps -q postgres):/backups ./backups + $ docker cp $(docker compose -f local.yml ps -q postgres):/backups ./backups .. _`command`: https://docs.docker.com/engine/reference/commandline/cp/ @@ -66,7 +66,7 @@ Restoring from the Existing Backup To restore from one of the backups you have already got (take the ``backup_2018_03_13T09_05_07.sql.gz`` for example), :: - $ docker-compose -f local.yml exec postgres restore backup_2018_03_13T09_05_07.sql.gz + $ docker compose -f local.yml exec postgres restore backup_2018_03_13T09_05_07.sql.gz You will see something like :: @@ -94,5 +94,5 @@ Backup to Amazon S3 ---------------------------------- For uploading your backups to Amazon S3 you can use the aws cli container. There is an upload command for uploading the postgres /backups directory recursively and there is a download command for downloading a specific backup. The default S3 environment variables are used. :: - $ docker-compose -f production.yml run --rm awscli upload - $ docker-compose -f production.yml run --rm awscli download backup_2018_03_13T09_05_07.sql.gz + $ docker compose -f production.yml run --rm awscli upload + $ docker compose -f production.yml run --rm awscli download backup_2018_03_13T09_05_07.sql.gz diff --git a/docs/document.rst b/docs/document.rst index 974c66c69..26f5d56a1 100644 --- a/docs/document.rst +++ b/docs/document.rst @@ -11,7 +11,7 @@ After you have set up to `develop locally`_, run the following command from the If you set up your project to `develop locally with docker`_, run the following command: :: - $ docker-compose -f local.yml up docs + $ docker compose -f local.yml up docs Navigate to port 9000 on your host to see the documentation. This will be opened automatically at `localhost`_ for local, non-docker development. diff --git a/docs/testing.rst b/docs/testing.rst index bea45c6dd..6387a6e1e 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -19,7 +19,7 @@ You will get a readout of the `users` app that has already been set up with test If you set up your project to `develop locally with docker`_, run the following command: :: - $ docker-compose -f local.yml run --rm django pytest + $ docker compose -f local.yml run --rm django pytest Targeting particular apps for testing in ``docker`` follows a similar pattern as previously shown above. @@ -36,8 +36,8 @@ Once the tests are complete, in order to see the code coverage, run the followin If you're running the project locally with Docker, use these commands instead: :: - $ docker-compose -f local.yml run --rm django coverage run -m pytest - $ docker-compose -f local.yml run --rm django coverage report + $ docker compose -f local.yml run --rm django coverage run -m pytest + $ docker compose -f local.yml run --rm django coverage report .. note:: diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 293e9b652..80bab2e29 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -24,13 +24,13 @@ Examples of logs:: If you recreate the project multiple times with the same name, Docker would preserve the volumes for the postgres container between projects. Here is what happens: #. You generate the project the first time. The .env postgres file is populated with the random password -#. You run the docker-compose and the containers are created. The postgres container creates the database based on the .env file credentials +#. You run the docker compose and the containers are created. The postgres container creates the database based on the .env file credentials #. You "regenerate" the project with the same name, so the postgres .env file is populated with a new random password -#. You run docker-compose. Since the names of the containers are the same, docker will try to start them (not create them from scratch i.e. it won't execute the Dockerfile to recreate the database). When this happens, it tries to start the database based on the new credentials which do not match the ones that the database was created with, and you get the error message above. +#. You run docker compose. Since the names of the containers are the same, docker will try to start them (not create them from scratch i.e. it won't execute the Dockerfile to recreate the database). When this happens, it tries to start the database based on the new credentials which do not match the ones that the database was created with, and you get the error message above. To fix this, you can either: -- Clear your project-related Docker cache with ``docker-compose -f local.yml down --volumes --rmi all``. +- Clear your project-related Docker cache with ``docker compose -f local.yml down --volumes --rmi all``. - Use the Docker volume sub-commands to find volumes (`ls`_) and remove them (`rm`_). - Use the `prune`_ command to clear system-wide (use with care!). diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 2eb7ae52e..853935e8c 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -271,7 +271,7 @@ def test_djlint_check_passes(cookies, context_override): ["use_docker", "expected_test_script"], [ ("n", "pytest"), - ("y", "docker-compose -f local.yml run django pytest"), + ("y", "docker compose -f local.yml run django pytest"), ], ) def test_travis_invokes_pytest(cookies, context, use_docker, expected_test_script): @@ -296,7 +296,7 @@ def test_travis_invokes_pytest(cookies, context, use_docker, expected_test_scrip ["use_docker", "expected_test_script"], [ ("n", "pytest"), - ("y", "docker-compose -f local.yml run django pytest"), + ("y", "docker compose -f local.yml run django pytest"), ], ) def test_gitlab_invokes_precommit_and_pytest(cookies, context, use_docker, expected_test_script): @@ -323,7 +323,7 @@ def test_gitlab_invokes_precommit_and_pytest(cookies, context, use_docker, expec ["use_docker", "expected_test_script"], [ ("n", "pytest"), - ("y", "docker-compose -f local.yml run django pytest"), + ("y", "docker compose -f local.yml run django pytest"), ], ) def test_github_invokes_linter_and_pytest(cookies, context, use_docker, expected_test_script): diff --git a/tests/test_docker.sh b/tests/test_docker.sh index 5c60d20d3..8e4055e20 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -15,28 +15,28 @@ cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y "$@" cd my_awesome_project # make sure all images build -docker-compose -f local.yml build +docker compose -f local.yml build # run the project's type checks -docker-compose -f local.yml run django mypy my_awesome_project +docker compose -f local.yml run django mypy my_awesome_project # run the project's tests -docker-compose -f local.yml run django pytest +docker compose -f local.yml run django pytest # return non-zero status code if there are migrations that have not been created -docker-compose -f local.yml run django python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; } +docker compose -f local.yml run django python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; } # Test support for translations -docker-compose -f local.yml run django python manage.py makemessages --all +docker compose -f local.yml run django python manage.py makemessages --all # Make sure the check doesn't raise any warnings -docker-compose -f local.yml run django python manage.py check --fail-level WARNING +docker compose -f local.yml run django python manage.py check --fail-level WARNING # Generate the HTML for the documentation -docker-compose -f local.yml run docs make html +docker compose -f local.yml run docs make html # Run npm build script if package.json is present if [ -f "package.json" ] then - docker-compose -f local.yml run node npm run build + docker compose -f local.yml run node npm run build fi diff --git a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml index 8f9824e8f..3a863ccb9 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml @@ -69,16 +69,16 @@ jobs: {%- if cookiecutter.use_docker == 'y' %} - name: Build the Stack - run: docker-compose -f local.yml build + run: docker compose -f local.yml build - name: Run DB Migrations - run: docker-compose -f local.yml run --rm django python manage.py migrate + run: docker compose -f local.yml run --rm django python manage.py migrate - name: Run Django Tests - run: docker-compose -f local.yml run django pytest + run: docker compose -f local.yml run django pytest - name: Tear down the Stack - run: docker-compose -f local.yml down + run: docker compose -f local.yml down {%- else %} - name: Set up Python diff --git a/{{cookiecutter.project_slug}}/.gitlab-ci.yml b/{{cookiecutter.project_slug}}/.gitlab-ci.yml index a312a41ae..350212003 100644 --- a/{{cookiecutter.project_slug}}/.gitlab-ci.yml +++ b/{{cookiecutter.project_slug}}/.gitlab-ci.yml @@ -33,12 +33,12 @@ pytest: services: - docker:dind before_script: - - docker-compose -f local.yml build + - docker compose -f local.yml build # Ensure celerybeat does not crash due to non-existent tables - - docker-compose -f local.yml run --rm django python manage.py migrate - - docker-compose -f local.yml up -d + - docker compose -f local.yml run --rm django python manage.py migrate + - docker compose -f local.yml up -d script: - - docker-compose -f local.yml run django pytest + - docker compose -f local.yml run django pytest {%- else %} image: python:3.11 tags: diff --git a/{{cookiecutter.project_slug}}/.travis.yml b/{{cookiecutter.project_slug}}/.travis.yml index 5e5f92ff5..cd703d3ad 100644 --- a/{{cookiecutter.project_slug}}/.travis.yml +++ b/{{cookiecutter.project_slug}}/.travis.yml @@ -17,16 +17,16 @@ jobs: - name: "Django Test" {%- if cookiecutter.use_docker == 'y' %} before_script: - - docker-compose -v + - docker compose -v - docker -v - - docker-compose -f local.yml build + - docker compose -f local.yml build # Ensure celerybeat does not crash due to non-existent tables - - docker-compose -f local.yml run --rm django python manage.py migrate - - docker-compose -f local.yml up -d + - docker compose -f local.yml run --rm django python manage.py migrate + - docker compose -f local.yml up -d script: - - "docker-compose -f local.yml run django pytest" + - "docker compose -f local.yml run django pytest" after_failure: - - docker-compose -f local.yml logs + - docker compose -f local.yml logs {%- else %} before_install: - sudo apt-get update -qq diff --git a/{{cookiecutter.project_slug}}/compose/production/aws/maintenance/download b/{{cookiecutter.project_slug}}/compose/production/aws/maintenance/download index 0c515935f..9561d917a 100644 --- a/{{cookiecutter.project_slug}}/compose/production/aws/maintenance/download +++ b/{{cookiecutter.project_slug}}/compose/production/aws/maintenance/download @@ -3,7 +3,7 @@ ### Download a file from your Amazon S3 bucket to the postgres /backups folder ### ### Usage: -### $ docker-compose -f production.yml run --rm awscli <1> +### $ docker compose -f production.yml run --rm awscli <1> set -o errexit set -o pipefail diff --git a/{{cookiecutter.project_slug}}/compose/production/aws/maintenance/upload b/{{cookiecutter.project_slug}}/compose/production/aws/maintenance/upload index 9446b9304..73c1b9bec 100644 --- a/{{cookiecutter.project_slug}}/compose/production/aws/maintenance/upload +++ b/{{cookiecutter.project_slug}}/compose/production/aws/maintenance/upload @@ -3,7 +3,7 @@ ### Upload the /backups folder to Amazon S3 ### ### Usage: -### $ docker-compose -f production.yml run --rm awscli upload +### $ docker compose -f production.yml run --rm awscli upload set -o errexit set -o pipefail diff --git a/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/backup b/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/backup index ee0c9d63c..f72304c05 100644 --- a/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/backup +++ b/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/backup @@ -4,7 +4,7 @@ ### Create a database backup. ### ### Usage: -### $ docker-compose -f .yml (exec |run --rm) postgres backup +### $ docker compose -f .yml (exec |run --rm) postgres backup set -o errexit diff --git a/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/backups b/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/backups index 0484ccff5..a18937d62 100644 --- a/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/backups +++ b/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/backups @@ -4,7 +4,7 @@ ### View backups. ### ### Usage: -### $ docker-compose -f .yml (exec |run --rm) postgres backups +### $ docker compose -f .yml (exec |run --rm) postgres backups set -o errexit diff --git a/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/restore b/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/restore index 9661ca7f1..c68f17d71 100644 --- a/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/restore +++ b/{{cookiecutter.project_slug}}/compose/production/postgres/maintenance/restore @@ -7,7 +7,7 @@ ### <1> filename of an existing backup. ### ### Usage: -### $ docker-compose -f .yml (exec |run --rm) postgres restore <1> +### $ docker compose -f .yml (exec |run --rm) postgres restore <1> set -o errexit diff --git a/{{cookiecutter.project_slug}}/docs/howto.rst b/{{cookiecutter.project_slug}}/docs/howto.rst index 7f2d26a1e..7d86351cf 100644 --- a/{{cookiecutter.project_slug}}/docs/howto.rst +++ b/{{cookiecutter.project_slug}}/docs/howto.rst @@ -8,14 +8,14 @@ Documentation can be written as rst files in `{{cookiecutter.project_slug}}/docs {% if cookiecutter.use_docker == 'n' %} To build and serve docs, use the command:: - - make livehtml - -from inside the `{{cookiecutter.project_slug}}/docs` directory. + + make livehtml + +from inside the `{{cookiecutter.project_slug}}/docs` directory. {% else %} To build and serve docs, use the commands:: - - docker-compose -f local.yml up docs + + docker compose -f local.yml up docs {% endif %} @@ -34,12 +34,12 @@ For an in-use example, see the `page source <_sources/users.rst.txt>`_ for :ref: To compile all docstrings automatically into documentation source files, use the command: :: - + make apidocs {% if cookiecutter.use_docker == 'y' %} This can be done in the docker container: - :: - + :: + docker run --rm docs make apidocs {% endif -%} diff --git a/{{cookiecutter.project_slug}}/locale/README.md b/{{cookiecutter.project_slug}}/locale/README.md index b2a8a0ef2..a514ad10c 100644 --- a/{{cookiecutter.project_slug}}/locale/README.md +++ b/{{cookiecutter.project_slug}}/locale/README.md @@ -3,7 +3,7 @@ Start by configuring the `LANGUAGES` settings in `base.py`, by uncommenting languages you are willing to support. Then, translations strings will be placed in this folder when running: ```bash -{% if cookiecutter.use_docker == 'y' %}docker-compose -f local.yml run --rm django {% endif %}python manage.py makemessages -all --no-location +{% if cookiecutter.use_docker == 'y' %}docker compose -f local.yml run --rm django {% endif %}python manage.py makemessages -all --no-location ``` This should generate `django.po` (stands for Portable Object) files under each locale `/LC_MESSAGES/django.po`. Each translatable string in the codebase is collected with its `msgid` and need to be translated as `msgstr`, for example: @@ -16,7 +16,7 @@ msgstr "utilisateurs" Once all translations are done, they need to be compiled into `.mo` files (stands for Machine Object), which are the actual binary files used by the application: ```bash -{% if cookiecutter.use_docker == 'y' %}docker-compose -f local.yml run --rm django {% endif %}python manage.py compilemessages +{% if cookiecutter.use_docker == 'y' %}docker compose -f local.yml run --rm django {% endif %}python manage.py compilemessages ``` Note that the `.po` files are NOT used by the application directly, so if the `.mo` files are out of dates, the content won't appear as translated even if the `.po` files are up-to-date. From 842fa01af0f40da0cc23fc81a0a2806e56e60fdc Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 24 Jul 2023 09:43:43 +0000 Subject: [PATCH 24/43] 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 8a9a2d205..4419e2620 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1418,5 +1418,10 @@ "name": "villancikos", "github_login": "villancikos", "twitter_username": "" + }, + { + "name": "Imran Rahman", + "github_login": "infraredCoding", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ea54113d2..4941f07f7 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -957,6 +957,13 @@ Listed in alphabetical order. + + Imran Rahman + + infraredCoding + + + innicoder From a50f2bee949560d122008aa433e23ff5e3e9820c Mon Sep 17 00:00:00 2001 From: Imran Rahman <63735892+infraredCoding@users.noreply.github.com> Date: Mon, 24 Jul 2023 17:41:10 +0600 Subject: [PATCH 25/43] Display custom 403_csrf.html while getting a csrf error in prod (#4464) Co-authored-by: Imran Rahman --- .../templates/403_csrf.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html new file mode 100644 index 000000000..d90b33f9b --- /dev/null +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html @@ -0,0 +1,14 @@ +{% raw %}{% extends "base.html" %} + +{% block title %}Forbidden (403){% endblock title %} +{% block content %} +

Forbidden (403)

+

+ {% if exception %} + {{ exception }} + {% else %} + You're not allowed to access this page. + {% endif %} +

+{% endblock content %} +{%- endraw %} From 89ecc2e5764d70e9da08da55b21be8083f030c78 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 24 Jul 2023 10:36:15 -0500 Subject: [PATCH 26/43] Update drf-spectacular to 0.26.4 (#4481) --- {{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 c9813f25d..b0f47703f 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -43,7 +43,7 @@ django-redis==5.3.0 # https://github.com/jazzband/django-redis djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework django-cors-headers==4.2.0 # https://github.com/adamchainz/django-cors-headers # DRF-spectacular for api documentation -drf-spectacular==0.26.3 # https://github.com/tfranzel/drf-spectacular +drf-spectacular==0.26.4 # https://github.com/tfranzel/drf-spectacular {%- endif %} {%- if cookiecutter.frontend_pipeline == 'Webpack' %} django-webpack-loader==2.0.1 # https://github.com/django-webpack/django-webpack-loader From 64d9bd8c14551b25d1ed2df836da6b94c36c79a4 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 25 Jul 2023 02:28:58 +0000 Subject: [PATCH 27/43] Release 2023.07.24 --- CHANGELOG.md | 15 +++++++++++++++ setup.py | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ee261fda..645064266 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,21 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.24 + + +### Fixed + +- Add missing custom CRSF error page in prod ([#4464](https://github.com/cookiecutter/cookiecutter-django/pull/4464)) + +### Documentation + +- Replace `docker-compose` by `docker compose` in docs ([#4463](https://github.com/cookiecutter/cookiecutter-django/pull/4463)) + +### Updated + +- Update drf-spectacular to 0.26.4 ([#4481](https://github.com/cookiecutter/cookiecutter-django/pull/4481)) + ## 2023.07.20 diff --git a/setup.py b/setup.py index 6f4ec86be..43e1b54cf 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.20" +version = "2023.07.24" with open("README.rst") as readme_file: long_description = readme_file.read() From 72e91da973e88ead4273b2c66ca9d4004284cf8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 10:21:53 -0300 Subject: [PATCH 28/43] Bump traefik (#4483) Bumps traefik from 2.10.3 to 2.10.4. --- updated-dependencies: - dependency-name: traefik 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/traefik/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile index bdedff720..e547dfbb8 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile @@ -1,4 +1,4 @@ -FROM traefik:2.10.3 +FROM traefik:2.10.4 RUN mkdir -p /etc/traefik/acme \ && touch /etc/traefik/acme/acme.json \ && chmod 600 /etc/traefik/acme/acme.json From 286c68c06f54db01cbebdee56e8309ca119cf519 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 26 Jul 2023 02:22:13 +0000 Subject: [PATCH 29/43] Release 2023.07.25 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 645064266..0b768dd32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.25 + + +### Updated + +- Upgrade to traefik 2.10.4 ([#4483](https://github.com/cookiecutter/cookiecutter-django/pull/4483)) + ## 2023.07.24 diff --git a/setup.py b/setup.py index 43e1b54cf..d0647dde6 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.24" +version = "2023.07.25" with open("README.rst") as readme_file: long_description = readme_file.read() From eca21f5b774e427c49989530766f9aa660c3d264 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 26 Jul 2023 09:50:16 +0100 Subject: [PATCH 30/43] Update broken link to https Fix #4484 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a39fb084..d50537104 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ production-ready Django projects quickly. - Works with Python 3.11 - Renders Django projects with 100% starting test coverage - Twitter [Bootstrap](https://github.com/twbs/bootstrap) v5 -- [12-Factor](http://12factor.net/) based settings via [django-environ](https://github.com/joke2k/django-environ) +- [12-Factor](https://12factor.net) based settings via [django-environ](https://github.com/joke2k/django-environ) - Secure by default. We believe in SSL. - Optimized development and production settings - Registration via [django-allauth](https://github.com/pennersr/django-allauth) From 01962fb3a1f79182470431caecf79282b10e9822 Mon Sep 17 00:00:00 2001 From: hleroy Date: Thu, 27 Jul 2023 13:28:49 +0200 Subject: [PATCH 31/43] Add Webpack instructions for developping locally with HTTPS (#4486) * Add Webpack instructions for developping locally with HTTPS * Fix formatting of code blocks --------- Co-authored-by: Bruno Alla --- docs/developing-locally-docker.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index c205c852b..135e063ef 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -330,3 +330,26 @@ See `https with nginx`_ for more information on this configuration. Add ``certs/*`` to the ``.gitignore`` file. This allows the folder to be included in the repo but its contents to be ignored. *This configuration is for local development environments only. Do not use this for production since you might expose your local* ``rootCA-key.pem``. + +Webpack +~~~~~~~ + +If you are using Webpack: + +1. On the ``nginx-proxy`` service in ``local.yml``, change ``depends_on`` to ``node`` instead of ``django``. + +2. On the ``node`` service in ``local.yml``, add the following environment configuration: + + :: + + environment: + - VIRTUAL_HOST=my-dev-env.local + - VIRTUAL_PORT=3000 + +3. Add the following configuration to the ``devServer`` section of ``webpack/dev.config.js``: + + :: + + client: { + webSocketURL: 'auto://0.0.0.0:0/ws', // note the `:0` after `0.0.0.0` + }, From 7a81a561c9f5461fd62666eef528df255b28d2d3 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 27 Jul 2023 11:29:24 +0000 Subject: [PATCH 32/43] 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 4419e2620..f7f31daa4 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1423,5 +1423,10 @@ "name": "Imran Rahman", "github_login": "infraredCoding", "twitter_username": "" + }, + { + "name": "hleroy", + "github_login": "hleroy", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4941f07f7..35ab20aa4 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -936,6 +936,13 @@ Listed in alphabetical order. + + hleroy + + hleroy + + + Hoai-Thu Vuong From 0ecb9ce299c47339559480a41ba31dae00f689a6 Mon Sep 17 00:00:00 2001 From: Imran Rahman <63735892+infraredCoding@users.noreply.github.com> Date: Thu, 27 Jul 2023 19:42:04 +0600 Subject: [PATCH 33/43] Explicitly state that docker exec does not work for running management commands (#4487) Co-authored-by: Imran Rahman --- docs/developing-locally-docker.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 135e063ef..6af4fe7c2 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -77,7 +77,7 @@ As with any shell command that we wish to run in our container, this is done usi $ docker compose -f local.yml run --rm django python manage.py createsuperuser Here, ``django`` is the target service we are executing the commands against. - +Also, please note that the ``docker exec`` does not work for running management commands. (Optionally) Designate your Docker Development Server IP -------------------------------------------------------- From 4e7aff306e154f7b2b1c89caeecb7620bf1fa371 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 28 Jul 2023 02:17:48 +0000 Subject: [PATCH 34/43] Release 2023.07.27 --- CHANGELOG.md | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b768dd32..aa1242245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.27 + + +### Documentation + +- Document that `docker exec` does not work for running management commands ([#4487](https://github.com/cookiecutter/cookiecutter-django/pull/4487)) + +- Add Webpack instructions for developping locally with HTTPS ([#4486](https://github.com/cookiecutter/cookiecutter-django/pull/4486)) + ## 2023.07.25 diff --git a/setup.py b/setup.py index d0647dde6..f24a4e778 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.25" +version = "2023.07.27" with open("README.rst") as readme_file: long_description = readme_file.read() From 40ddc4b6af57c53b137981bf7b1c06c0d51c27d7 Mon Sep 17 00:00:00 2001 From: Shayan Karimi Date: Fri, 28 Jul 2023 15:33:47 +0330 Subject: [PATCH 35/43] Add support for Drone (#4382) * Add overall config for drone.io support * Update docs * Configure basic CI setup * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix python image version for tests step --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- cookiecutter.json | 2 +- docs/project-generation-options.rst | 3 ++ hooks/post_gen_project.py | 7 ++++ tests/test_cookiecutter_generation.py | 1 + {{cookiecutter.project_slug}}/.drone.yml | 48 ++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 {{cookiecutter.project_slug}}/.drone.yml diff --git a/cookiecutter.json b/cookiecutter.json index 3fcab4a78..f66e281f5 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -39,7 +39,7 @@ "use_sentry": "n", "use_whitenoise": "n", "use_heroku": "n", - "ci_tool": ["None", "Travis", "Gitlab", "Github"], + "ci_tool": ["None", "Travis", "Gitlab", "Github", "Drone"], "keep_local_envs_in_vcs": "y", "debug": "n" } diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index edf2306d4..bd368ae84 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -135,6 +135,7 @@ ci_tool: 2. `Travis CI`_ 3. `Gitlab CI`_ 4. `Github Actions`_ + 5. `Drone CI`_ keep_local_envs_in_vcs: Indicates whether the project's ``.envs/.local/`` should be kept in VCS @@ -196,4 +197,6 @@ debug: .. _GitLab CI: https://docs.gitlab.com/ee/ci/ +.. _Drone CI: https://docs.drone.io/pipeline/overview/ + .. _Github Actions: https://docs.github.com/en/actions diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index a913f7592..b2578262d 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -238,6 +238,10 @@ def remove_dotgithub_folder(): shutil.rmtree(".github") +def remove_dotdrone_file(): + os.remove(".drone.yml") + + def generate_random_string(length, using_digits=False, using_ascii_letters=False, using_punctuation=False): """ Example: @@ -491,6 +495,9 @@ def main(): if "{{ cookiecutter.ci_tool }}" != "Github": remove_dotgithub_folder() + if "{{ cookiecutter.ci_tool }}" != "Drone": + remove_dotdrone_file() + if "{{ cookiecutter.use_drf }}".lower() == "n": remove_drf_starter_files() diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 853935e8c..87e52ef01 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -127,6 +127,7 @@ SUPPORTED_COMBINATIONS = [ {"ci_tool": "Travis"}, {"ci_tool": "Gitlab"}, {"ci_tool": "Github"}, + {"ci_tool": "Drone"}, {"keep_local_envs_in_vcs": "y"}, {"keep_local_envs_in_vcs": "n"}, {"debug": "y"}, diff --git a/{{cookiecutter.project_slug}}/.drone.yml b/{{cookiecutter.project_slug}}/.drone.yml new file mode 100644 index 000000000..dc08bfbab --- /dev/null +++ b/{{cookiecutter.project_slug}}/.drone.yml @@ -0,0 +1,48 @@ +kind: pipeline +name: default + +environment: + POSTGRES_USER: '{{ cookiecutter.project_slug }}' + POSTGRES_PASSWORD: '' + POSTGRES_DB: 'test_{{ cookiecutter.project_slug }}' + POSTGRES_HOST_AUTH_METHOD: trust + {%- if cookiecutter.use_celery == 'y' %} + CELERY_BROKER_URL: 'redis://redis:6379/0' + {%- endif %} + +steps: +- name: lint + pull: if-not-exists + image: python:3.11 + environment: + PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit + volumes: + - name: pre-commit cache + path: ${PRE_COMMIT_HOME} + commands: + - export PRE_COMMIT_HOME=$CI_PROJECT_DIR/.cache/pre-commit + - pip install -q pre-commit + - pre-commit run --show-diff-on-failure --color=always --all-files + +- name: test + pull: if-not-exists + {%- if cookiecutter.use_docker == 'y' %} + image: docker/compose:1.29.2 + environment: + DATABASE_URL: pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB + commands: + - docker-compose -f local.yml build + - docker-compose -f local.yml run --rm django python manage.py migrate + - docker-compose -f local.yml up -d + - docker-compose -f local.yml run django pytest + {%- else %} + image: python:3.11 + commands: + - pip install -r requirements/local.txt + - pytest + {%- endif%} + +volumes: +- name: pre-commit cache + host: + path: /tmp/drone/cache/pre-commit From 6354f7f64f43a38ab88bf58fdffcb98721dc1c02 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 28 Jul 2023 12:04:23 +0000 Subject: [PATCH 36/43] 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 f7f31daa4..51d31ea1e 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1428,5 +1428,10 @@ "name": "hleroy", "github_login": "hleroy", "twitter_username": "" + }, + { + "name": "Shayan Karimi", + "github_login": "shywn-mrk", + "twitter_username": "shywn_mrk" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 35ab20aa4..09f9d38d4 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1720,6 +1720,13 @@ Listed in alphabetical order. sebastianreyese + + Shayan Karimi + + shywn-mrk + + shywn_mrk + Simon Rey From a4c397890eb2bab001d83990c45d01eedceb27e3 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 29 Jul 2023 02:15:29 +0000 Subject: [PATCH 37/43] Release 2023.07.28 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa1242245..6c2ea2dcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.28 + + +### Changed + +- Add support for Drone CI ([#4382](https://github.com/cookiecutter/cookiecutter-django/pull/4382)) + ## 2023.07.27 diff --git a/setup.py b/setup.py index f24a4e778..67415da54 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.27" +version = "2023.07.28" with open("README.rst") as readme_file: long_description = readme_file.read() From 9eea9c894e3f0394b0ec4837a5d2e7db44ef9809 Mon Sep 17 00:00:00 2001 From: Sadra Yahyapour Date: Sun, 30 Jul 2023 14:45:06 +0330 Subject: [PATCH 38/43] README.md file extension issue fixed (#4488) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 67415da54..a0014cbe9 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ except ImportError: # We use calendar versioning version = "2023.07.28" -with open("README.rst") as readme_file: +with open("README.md") as readme_file: long_description = readme_file.read() setup( From 7b27d791fa767867ef3e338172aecc6411f87895 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 30 Jul 2023 11:15:43 +0000 Subject: [PATCH 39/43] 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 51d31ea1e..c115f8912 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1433,5 +1433,10 @@ "name": "Shayan Karimi", "github_login": "shywn-mrk", "twitter_username": "shywn_mrk" + }, + { + "name": "Sadra Yahyapour", + "github_login": "lnxpy", + "twitter_username": "lnxpylnxpy" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 09f9d38d4..f5dd8cf94 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1699,6 +1699,13 @@ Listed in alphabetical order. + + Sadra Yahyapour + + lnxpy + + lnxpylnxpy + Sam Collins From 7844cfe008941f3079407d66e54cc4854b935fb5 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 31 Jul 2023 02:18:38 +0000 Subject: [PATCH 40/43] Release 2023.07.30 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c2ea2dcf..aca9023ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.30 + + +### Fixed + +- Fix `README.md` file extension in `setup.py` ([#4488](https://github.com/cookiecutter/cookiecutter-django/pull/4488)) + ## 2023.07.28 diff --git a/setup.py b/setup.py index a0014cbe9..bf69a61d8 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.28" +version = "2023.07.30" with open("README.md") as readme_file: long_description = readme_file.read() From 82a944bc6745f175fb72606216aa53aa56f39026 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 1 Aug 2023 08:43:38 -0500 Subject: [PATCH 41/43] Update sentry-sdk to 1.29.1 (#4494) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 03b75a65f..7af905756 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.28.1 # https://github.com/getsentry/sentry-python +sentry-sdk==1.29.1 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py From 093b346b3db1dc3944982a698f24346c0cca7cd9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 1 Aug 2023 08:43:51 -0500 Subject: [PATCH 42/43] Update uvicorn to 0.23.2 (#4490) --- {{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 b0f47703f..719925eff 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -23,7 +23,7 @@ flower==2.0.0 # https://github.com/mher/flower {%- endif %} {%- endif %} {%- if cookiecutter.use_async == 'y' %} -uvicorn[standard]==0.23.1 # https://github.com/encode/uvicorn +uvicorn[standard]==0.23.2 # https://github.com/encode/uvicorn {%- endif %} # Django From d54f29fd4fa92e30bf2494d945a1e4e083294680 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 1 Aug 2023 08:44:02 -0500 Subject: [PATCH 43/43] Update flake8 to 6.1.0 (#4489) * Update flake8 from 6.0.0 to 6.1.0 * Update flake8 from 6.0.0 to 6.1.0 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 160e70c11..cde8904cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ binaryornot==0.4.4 # ------------------------------------------------------------------------------ black==23.7.0 isort==5.12.0 -flake8==6.0.0 +flake8==6.1.0 django-upgrade==1.14.0 djlint==1.32.1 pre-commit==3.3.3 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 569fd2331..a520aede4 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -28,7 +28,7 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ -flake8==6.0.0 # https://github.com/PyCQA/flake8 +flake8==6.1.0 # https://github.com/PyCQA/flake8 flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort coverage==7.2.7 # https://github.com/nedbat/coveragepy black==23.7.0 # https://github.com/psf/black