From eeb02c2198cb455bb53d58b1c81bb42fa5943678 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 25 Feb 2023 12:33:30 +0000 Subject: [PATCH 01/73] Run linting with pre-commit on GitLab (#4150) * Run linting with pre-commit on GitLab * Update tests --- tests/test_cookiecutter_generation.py | 6 ++++-- {{cookiecutter.project_slug}}/.gitlab-ci.yml | 22 +++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 5608bf884..7628e5e1d 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -232,7 +232,7 @@ def test_travis_invokes_pytest(cookies, context, use_docker, expected_test_scrip ("y", "docker-compose -f local.yml run django pytest"), ], ) -def test_gitlab_invokes_flake8_and_pytest( +def test_gitlab_invokes_precommit_and_pytest( cookies, context, use_docker, expected_test_script ): context.update({"ci_tool": "Gitlab", "use_docker": use_docker}) @@ -246,7 +246,9 @@ def test_gitlab_invokes_flake8_and_pytest( with open(f"{result.project_path}/.gitlab-ci.yml") as gitlab_yml: try: gitlab_config = yaml.safe_load(gitlab_yml) - assert gitlab_config["flake8"]["script"] == ["flake8"] + assert gitlab_config["precommit"]["script"] == [ + "pre-commit run --show-diff-on-failure --color=always --all-files" + ] assert gitlab_config["pytest"]["script"] == [expected_test_script] except yaml.YAMLError as e: pytest.fail(e) diff --git a/{{cookiecutter.project_slug}}/.gitlab-ci.yml b/{{cookiecutter.project_slug}}/.gitlab-ci.yml index dbb65fb73..7892ad63a 100644 --- a/{{cookiecutter.project_slug}}/.gitlab-ci.yml +++ b/{{cookiecutter.project_slug}}/.gitlab-ci.yml @@ -7,21 +7,26 @@ variables: POSTGRES_PASSWORD: '' POSTGRES_DB: 'test_{{ cookiecutter.project_slug }}' POSTGRES_HOST_AUTH_METHOD: trust - {% if cookiecutter.use_celery == 'y' -%} + {%- if cookiecutter.use_celery == 'y' %} CELERY_BROKER_URL: 'redis://redis:6379/0' {%- endif %} -flake8: +precommit: stage: lint - image: python:3.10-alpine + image: python:3.10 + variables: + PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit + cache: + paths: + - ${PRE_COMMIT_HOME} before_script: - - pip install -q flake8 + - pip install -q pre-commit script: - - flake8 + - pre-commit run --show-diff-on-failure --color=always --all-files pytest: stage: test - {% if cookiecutter.use_docker == 'y' -%} + {%- if cookiecutter.use_docker == 'y' %} image: docker/compose:1.29.2 tags: - docker @@ -34,7 +39,7 @@ pytest: - docker-compose -f local.yml up -d script: - docker-compose -f local.yml run django pytest - {%- else -%} + {%- else %} image: python:3.10 tags: - python @@ -42,11 +47,8 @@ pytest: - postgres:{{ cookiecutter.postgresql_version }} variables: DATABASE_URL: pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB - before_script: - pip install -r requirements/local.txt - script: - pytest {%- endif %} - From 757c9f45e294806b5db98ccf2b55e202f4407625 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Feb 2023 12:44:24 +0000 Subject: [PATCH 02/73] Bump garland/aws-cli-docker from 1.15.47 to 1.16.140 (#4136) Bumps garland/aws-cli-docker from 1.15.47 to 1.16.140. --- updated-dependencies: - dependency-name: garland/aws-cli-docker dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- {{cookiecutter.project_slug}}/compose/production/aws/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile index 8282047b3..4d1ecbb20 100644 --- a/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile @@ -1,4 +1,4 @@ -FROM garland/aws-cli-docker:1.15.47 +FROM garland/aws-cli-docker:1.16.140 COPY ./compose/production/aws/maintenance /usr/local/bin/maintenance COPY ./compose/production/postgres/maintenance/_sourced /usr/local/bin/maintenance/_sourced From dc78797c7440b179346c4eb978b0bb98cd40466f Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 26 Feb 2023 02:32:42 +0000 Subject: [PATCH 03/73] Release 2023.02.25 --- CHANGELOG.md | 23 +++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23604fd77..17cdfdf49 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.02.25 + +### Changed +- Run linting with pre-commit on GitLab ([#4150](https://github.com/cookiecutter/cookiecutter-django/pull/4150)) +### Fixed +- Disable caching for linter job on GitHub actions ([#4166](https://github.com/cookiecutter/cookiecutter-django/pull/4166)) +### Documentation +- Add instuction to run celery beat ([#4162](https://github.com/cookiecutter/cookiecutter-django/pull/4162)) +### Updated +- Bump garland/aws-cli-docker from 1.15.47 to 1.16.140 ([#4136](https://github.com/cookiecutter/cookiecutter-django/pull/4136)) +- Update djangorestframework-stubs to 1.9.1 ([#4184](https://github.com/cookiecutter/cookiecutter-django/pull/4184)) +- Update whitenoise to 6.4.0 ([#4180](https://github.com/cookiecutter/cookiecutter-django/pull/4180)) +- Update django-stubs to 1.15.0 ([#4183](https://github.com/cookiecutter/cookiecutter-django/pull/4183)) +- Update django-crispy-forms to 2.0 ([#4158](https://github.com/cookiecutter/cookiecutter-django/pull/4158)) +- Update django-cors-headers to 3.14.0 ([#4181](https://github.com/cookiecutter/cookiecutter-django/pull/4181)) +- Update python-slugify to 8.0.1 ([#4178](https://github.com/cookiecutter/cookiecutter-django/pull/4178)) +- Update pre-commit to 3.1.0 ([#4176](https://github.com/cookiecutter/cookiecutter-django/pull/4176)) +- Update mypy to 1.0.1 ([#4168](https://github.com/cookiecutter/cookiecutter-django/pull/4168)) +- Update werkzeug to 2.2.3 ([#4160](https://github.com/cookiecutter/cookiecutter-django/pull/4160)) +- Update coverage to 7.2.0 ([#4177](https://github.com/cookiecutter/cookiecutter-django/pull/4177)) +- Update django to 4.0.10 ([#4159](https://github.com/cookiecutter/cookiecutter-django/pull/4159)) +- Update hiredis to 2.2.2 ([#4156](https://github.com/cookiecutter/cookiecutter-django/pull/4156)) + ## 2023.02.17 ### Changed diff --git a/setup.py b/setup.py index c7566ba70..f486da1f3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.02.17" +version = "2023.02.25" with open("README.rst") as readme_file: long_description = readme_file.read() From 9665b067d731fdd0fe884c138f667be25ed6221d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 26 Feb 2023 15:07:25 -0500 Subject: [PATCH 04/73] Update coverage to 7.2.1 (#4186) --- {{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 27fa30b36..bd61e1a19 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -30,7 +30,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.0 # https://github.com/nedbat/coveragepy +coverage==7.2.1 # https://github.com/nedbat/coveragepy black==23.1.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From 2bbec96f31b92909fd4a1cf73b31c17007a76a51 Mon Sep 17 00:00:00 2001 From: Delphine LEMIRE Date: Sun, 26 Feb 2023 21:33:45 +0100 Subject: [PATCH 05/73] Fix readthedocs config file for generated project (#4172) * FIX: Uptade Template ci.yml linter requirements * IMPROVMENT_FIX: Template CI actions up to date * FIX: template readthedocs instructions * Update ci.yml * Update readthedocs config file * Update {{cookiecutter.project_slug}}/.readthedocs.yml --------- Co-authored-by: Bruno Alla --- {{cookiecutter.project_slug}}/.readthedocs.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.readthedocs.yml b/{{cookiecutter.project_slug}}/.readthedocs.yml index e943a5fa9..08d7f9c24 100644 --- a/{{cookiecutter.project_slug}}/.readthedocs.yml +++ b/{{cookiecutter.project_slug}}/.readthedocs.yml @@ -1,12 +1,20 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required version: 2 +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.10" + +# Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py -build: - image: testing - +# Python requirements required to build your docs python: - version: 3.10 install: - requirements: requirements/local.txt From 6a1aa159b602a35c9367af960b715eba538179aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 26 Feb 2023 20:47:54 +0000 Subject: [PATCH 06/73] Bump traefik from v2.2.11 to 2.9.8 (#4164) Bumps traefik from v2.2.11 to 2.9.8. --- updated-dependencies: - dependency-name: traefik dependency-type: direct:production ... 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 aa879052b..2365c4c49 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile @@ -1,4 +1,4 @@ -FROM traefik:v2.2.11 +FROM traefik:2.9.8 RUN mkdir -p /etc/traefik/acme \ && touch /etc/traefik/acme/acme.json \ && chmod 600 /etc/traefik/acme/acme.json From 2e7b717d1a46b765bbf58f97ad95a5e6982817a5 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 27 Feb 2023 02:30:14 +0000 Subject: [PATCH 07/73] Release 2023.02.26 --- CHANGELOG.md | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17cdfdf49..53b630e49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.02.26 + +### Changed +- Fix readthedocs config file for generated project ([#4172](https://github.com/cookiecutter/cookiecutter-django/pull/4172)) +### Updated +- Bump traefik from v2.2.11 to 2.9.8 ([#4164](https://github.com/cookiecutter/cookiecutter-django/pull/4164)) +- Update coverage to 7.2.1 ([#4186](https://github.com/cookiecutter/cookiecutter-django/pull/4186)) + ## 2023.02.25 ### Changed diff --git a/setup.py b/setup.py index f486da1f3..4b3f9ca3a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.02.25" +version = "2023.02.26" with open("README.rst") as readme_file: long_description = readme_file.read() From af2e4cb26a37cb622fb72cb0a8b86ec941bc731b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 27 Feb 2023 09:09:51 -0500 Subject: [PATCH 08/73] Update sentry-sdk to 1.16.0 (#4187) --- {{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 7cee00d5d..3d725fae7 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.9.5 # https://github.com/psycopg/psycopg2 Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.15.0 # https://github.com/getsentry/sentry-python +sentry-sdk==1.16.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.2 # https://github.com/redis/hiredis-py From 94455f4d1f1d7789c3e58742ee9134d070ca7111 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 28 Feb 2023 02:29:32 +0000 Subject: [PATCH 09/73] Release 2023.02.27 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53b630e49..1cd1362a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.02.27 + +### Updated +- Update sentry-sdk to 1.16.0 ([#4187](https://github.com/cookiecutter/cookiecutter-django/pull/4187)) + ## 2023.02.26 ### Changed diff --git a/setup.py b/setup.py index 4b3f9ca3a..cd99d6773 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.02.26" +version = "2023.02.27" with open("README.rst") as readme_file: long_description = readme_file.read() From 6706128924ca2135b001b5141d911d6cb7a74bf1 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 28 Feb 2023 04:28:12 -0500 Subject: [PATCH 10/73] Update pre-commit to 3.1.1 (#4188) * Update pre-commit from 3.1.0 to 3.1.1 * Update pre-commit from 3.1.0 to 3.1.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 564e70596..15380e3cb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ black==23.1.0 isort==5.12.0 flake8==6.0.0 flake8-isort==6.0.0 -pre-commit==3.1.0 +pre-commit==3.1.1 # Testing # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index bd61e1a19..73163150b 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -36,7 +36,7 @@ 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 {%- endif %} -pre-commit==3.1.0 # https://github.com/pre-commit/pre-commit +pre-commit==3.1.1 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From 4bf202ee5971fe08d521d8bacd59c62586b47bd2 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 1 Mar 2023 02:33:48 +0000 Subject: [PATCH 11/73] Release 2023.02.28 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cd1362a7..1d05a30f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.02.28 + +### Updated +- Update pre-commit to 3.1.1 ([#4188](https://github.com/cookiecutter/cookiecutter-django/pull/4188)) + ## 2023.02.27 ### Updated diff --git a/setup.py b/setup.py index cd99d6773..7e2bfa625 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.02.27" +version = "2023.02.28" with open("README.rst") as readme_file: long_description = readme_file.read() From c4b8bbb0c789e73e92c6dcb3c4a3d92e9bba1254 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 4 Mar 2023 13:21:32 -0500 Subject: [PATCH 12/73] Update drf-spectacular to 0.26.0 (#4192) --- {{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 ac6f876f8..18630c7b8 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -44,7 +44,7 @@ django-redis==5.2.0 # https://github.com/jazzband/django-redis djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework django-cors-headers==3.14.0 # https://github.com/adamchainz/django-cors-headers # DRF-spectacular for api documentation -drf-spectacular==0.25.1 # https://github.com/tfranzel/drf-spectacular +drf-spectacular==0.26.0 # https://github.com/tfranzel/drf-spectacular {%- endif %} {%- if cookiecutter.frontend_pipeline == 'Webpack' %} django-webpack-loader==1.8.1 # https://github.com/django-webpack/django-webpack-loader From 46868bed26f812be90a361dcd48ff68c912aa16a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 4 Mar 2023 13:21:53 -0500 Subject: [PATCH 13/73] Update pytest to 7.2.2 (#4191) * Update pytest from 7.2.1 to 7.2.2 * Update pytest from 7.2.1 to 7.2.2 --- 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 15380e3cb..5a65d6160 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ pre-commit==3.1.1 # Testing # ------------------------------------------------------------------------------ tox==4.4.6 -pytest==7.2.1 +pytest==7.2.2 pytest-cookies==0.6.1 pytest-instafail==0.4.2 pyyaml==6.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 73163150b..e1ab2dc29 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -15,7 +15,7 @@ watchfiles==0.18.1 # https://github.com/samuelcolvin/watchfiles # ------------------------------------------------------------------------------ mypy==1.0.1 # https://github.com/python/mypy django-stubs==1.15.0 # https://github.com/typeddjango/django-stubs -pytest==7.2.1 # https://github.com/pytest-dev/pytest +pytest==7.2.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} djangorestframework-stubs==1.9.1 # https://github.com/typeddjango/djangorestframework-stubs From 06369bfd4cab9470617d665bded585935a17388f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Micha=C5=82=20Ry=C5=9B?= <6430069+arrys@users.noreply.github.com> Date: Sat, 4 Mar 2023 19:36:11 +0100 Subject: [PATCH 14/73] Add option to serve media files locally using nginx (#2457) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add option to serve media files locally using nginx * Fix nginx media location and storage issue * Fix traefik django-media typo * Add certresolver property to web-media-router * Add trailing slash in nginx configuration to avoid path traversal exploits * Remove autoindexing from nginx configuration so nginx uses its default off setting * Use nginx to serve media files if cloud provider is None * Add back warning about lack of media files without Docker or Cloud providers * Update documentation * Fix typos and rephrase Co-authored-by: Arkadiusz Ryś --------- Co-authored-by: Bruno Alla Co-authored-by: Bruno Alla --- README.md | 2 +- docs/deployment-with-docker.rst | 4 ++++ docs/project-generation-options.rst | 2 +- hooks/post_gen_project.py | 7 +++++-- .../compose/production/nginx/Dockerfile | 2 ++ .../compose/production/nginx/default.conf | 7 +++++++ .../compose/production/traefik/traefik.yml | 19 +++++++++++++++++++ {{cookiecutter.project_slug}}/production.yml | 18 ++++++++++++++++++ 8 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/compose/production/nginx/Dockerfile create mode 100644 {{cookiecutter.project_slug}}/compose/production/nginx/default.conf diff --git a/README.md b/README.md index 7ab0b7e15..aaeb25828 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ production-ready Django projects quickly. - Optional basic ASGI setup for Websockets - Optional custom static build using Gulp or Webpack - Send emails via [Anymail](https://github.com/anymail/django-anymail) (using [Mailgun](http://www.mailgun.com/) by default or Amazon SES if AWS is selected cloud provider, but switchable) -- Media storage using Amazon S3, Google Cloud Storage or Azure Storage +- Media storage using Amazon S3, Google Cloud Storage, Azure Storage or nginx - Docker support using [docker-compose](https://github.com/docker/compose) for development and production (using [Traefik](https://traefik.io/) with [LetsEncrypt](https://letsencrypt.org/) support) - [Procfile](https://devcenter.heroku.com/articles/procfile) for deploying to Heroku - Instructions for deploying to [PythonAnywhere](https://www.pythonanywhere.com/) diff --git a/docs/deployment-with-docker.rst b/docs/deployment-with-docker.rst index a431679bf..c1b8c6d7b 100644 --- a/docs/deployment-with-docker.rst +++ b/docs/deployment-with-docker.rst @@ -187,3 +187,7 @@ For status check, run:: supervisorctl status +Media files without cloud provider +---------------------------------- + +If you chose no cloud provider and Docker, the media files will be served by an nginx service, from a ``production_django_media`` volume. Make sure to keep this around to avoid losing any media files. diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index d4ad8a9aa..9b379f12c 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -69,7 +69,7 @@ cloud_provider: 3. Azure_ 4. None - Note that if you choose no cloud provider, media files won't work. + If you choose no cloud provider and docker, the production stack will serve the media files via an nginx Docker service. Without Docker, the media files won't work. mail_service: Select an email service that Django-Anymail provides diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index b64bbbafd..dbc367175 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -491,9 +491,12 @@ def main(): use_async=("{{ cookiecutter.use_async }}".lower() == "y"), ) - if "{{ cookiecutter.cloud_provider }}" == "None": + if ( + "{{ cookiecutter.cloud_provider }}" == "None" + and "{{ cookiecutter.use_docker }}".lower() == "n" + ): print( - WARNING + "You chose not to use a cloud provider, " + WARNING + "You chose to not use any cloud providers nor Docker, " "media files won't be served in production." + TERMINATOR ) remove_storages_module() diff --git a/{{cookiecutter.project_slug}}/compose/production/nginx/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/nginx/Dockerfile new file mode 100644 index 000000000..911b16f71 --- /dev/null +++ b/{{cookiecutter.project_slug}}/compose/production/nginx/Dockerfile @@ -0,0 +1,2 @@ +FROM nginx:1.17.8-alpine +COPY ./compose/production/nginx/default.conf /etc/nginx/conf.d/default.conf diff --git a/{{cookiecutter.project_slug}}/compose/production/nginx/default.conf b/{{cookiecutter.project_slug}}/compose/production/nginx/default.conf new file mode 100644 index 000000000..aafdd5bee --- /dev/null +++ b/{{cookiecutter.project_slug}}/compose/production/nginx/default.conf @@ -0,0 +1,7 @@ +server { + listen 80; + server_name localhost; + location /media/ { + alias /usr/share/nginx/media/; + } +} diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml b/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml index cc183cd6c..ea57f4a51 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml @@ -57,6 +57,18 @@ http: # https://docs.traefik.io/master/routing/routers/#certresolver certResolver: letsencrypt {%- endif %} + {%- if cookiecutter.cloud_provider == 'None' %} + + web-media-router: + rule: "Host(`{{ cookiecutter.domain_name }}`) && PathPrefix(`/media/`)" + entryPoints: + - web-secure + middlewares: + - csrf + service: django-media + tls: + certResolver: letsencrypt + {%- endif %} middlewares: csrf: @@ -77,6 +89,13 @@ http: servers: - url: http://flower:5555 {%- endif %} + {%- if cookiecutter.cloud_provider == 'None' %} + + django-media: + loadBalancer: + servers: + - url: http://nginx:80 + {%- endif %} providers: # https://docs.traefik.io/master/providers/file/ diff --git a/{{cookiecutter.project_slug}}/production.yml b/{{cookiecutter.project_slug}}/production.yml index 45c8b3c1d..4e9b9e048 100644 --- a/{{cookiecutter.project_slug}}/production.yml +++ b/{{cookiecutter.project_slug}}/production.yml @@ -4,6 +4,9 @@ volumes: production_postgres_data: {} production_postgres_data_backups: {} production_traefik: {} + {%- if cookiecutter.cloud_provider == 'None' %} + production_django_media: {} + {%- endif %} services: django:{% if cookiecutter.use_celery == 'y' %} &django{% endif %} @@ -24,6 +27,10 @@ services: {%- endif %} image: {{ cookiecutter.project_slug }}_production_django + {%- if cookiecutter.cloud_provider == 'None' %} + volumes: + - production_django_media:/app/{{ cookiecutter.project_slug }}/media + {%- endif %} depends_on: - postgres - redis @@ -89,3 +96,14 @@ services: volumes: - production_postgres_data_backups:/backups:z {%- endif %} + {%- if cookiecutter.cloud_provider == 'None' %} + nginx: + build: + context: . + dockerfile: ./compose/production/nginx/Dockerfile + image: {{ cookiecutter.project_slug }}_local_nginx + depends_on: + - django + volumes: + - production_django_media:/usr/share/nginx/media:ro + {%- endif %} From b5a043551d1304957a8077840b99c54236d103e0 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 4 Mar 2023 18:36:44 +0000 Subject: [PATCH 15/73] 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 30bc0107e..c15476cc3 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1372,5 +1372,10 @@ "name": "Hoai-Thu Vuong", "github_login": "thuvh", "twitter_username": "" + }, + { + "name": "Arkadiusz Michał Ryś", + "github_login": "arrys", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 8a541c945..af99445d4 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -292,6 +292,13 @@ Listed in alphabetical order. + + Arkadiusz Michał Ryś + + arrys + + + Arnav Choudhury From 6e782bff33a2422a3b0cfbf1be46f5fc1e47f1a6 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 4 Mar 2023 18:45:25 +0000 Subject: [PATCH 16/73] Include contributing page to the docs (#4144) * Add MyST parser * Include contributing page to the docs --- docs/conf.py | 4 ++-- docs/contributing.md | 3 +++ docs/index.rst | 1 + docs/requirements.txt | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 docs/contributing.md diff --git a/docs/conf.py b/docs/conf.py index b53e6a7e7..b1a97750a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,13 +23,13 @@ now = datetime.now() # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = [] +extensions = ["myst_parser"] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # The suffix of source filenames. -source_suffix = ".rst" +source_suffix = [".rst", ".md"] # The encoding of source files. # source_encoding = 'utf-8-sig' diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 000000000..66c1f98d3 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,3 @@ +```{include} ../CONTRIBUTING.md + +``` diff --git a/docs/index.rst b/docs/index.rst index dae641d10..da5186487 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -27,6 +27,7 @@ Contents websocket faq troubleshooting + contributing Indices and tables ------------------ diff --git a/docs/requirements.txt b/docs/requirements.txt index 0982f3d25..d86ecffa9 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,3 @@ sphinx==6.1.3 sphinx-rtd-theme==1.2.0 +myst-parser==0.19.0 From 6e7355a8c9a44926bc8456f722c9ed542ef8a7da Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 4 Mar 2023 13:57:53 -0500 Subject: [PATCH 17/73] Update myst-parser to 0.19.1 (#4193) --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index d86ecffa9..661e9c02a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,3 @@ sphinx==6.1.3 sphinx-rtd-theme==1.2.0 -myst-parser==0.19.0 +myst-parser==0.19.1 From d6e3f41adb571209de5bdd01b3a0de6d03455dfb Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 5 Mar 2023 02:34:22 +0000 Subject: [PATCH 18/73] Release 2023.03.04 --- CHANGELOG.md | 11 +++++++++++ setup.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d05a30f9..c06100e04 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.03.04 + +### Changed +- Add option to serve media files locally using nginx ([#2457](https://github.com/cookiecutter/cookiecutter-django/pull/2457)) +### Documentation +- Include contributing page to the docs ([#4144](https://github.com/cookiecutter/cookiecutter-django/pull/4144)) +### Updated +- Update myst-parser to 0.19.1 ([#4193](https://github.com/cookiecutter/cookiecutter-django/pull/4193)) +- Update pytest to 7.2.2 ([#4191](https://github.com/cookiecutter/cookiecutter-django/pull/4191)) +- Update drf-spectacular to 0.26.0 ([#4192](https://github.com/cookiecutter/cookiecutter-django/pull/4192)) + ## 2023.02.28 ### Updated diff --git a/setup.py b/setup.py index 7e2bfa625..cd6170bb5 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.02.28" +version = "2023.03.04" with open("README.rst") as readme_file: long_description = readme_file.read() From 305364f5ad7852cd983be608dd1f625ef05c1aaf Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 7 Mar 2023 15:39:49 -0500 Subject: [PATCH 19/73] Update django-environ to 0.10.0 (#4195) --- {{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 18630c7b8..1550be1bb 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -30,7 +30,7 @@ uvicorn[standard]==0.20.0 # https://github.com/encode/uvicorn # Django # ------------------------------------------------------------------------------ django==4.0.10 # pyup: < 4.1 # https://www.djangoproject.com/ -django-environ==0.9.0 # https://github.com/joke2k/django-environ +django-environ==0.10.0 # https://github.com/joke2k/django-environ django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils django-allauth==0.52.0 # https://github.com/pennersr/django-allauth django-crispy-forms==2.0 # https://github.com/django-crispy-forms/django-crispy-forms From c326c3476b992da2ed289d808ff7d5e1db11c087 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 7 Mar 2023 15:40:09 -0500 Subject: [PATCH 20/73] Update mypy to 1.1.1 (#4196) --- {{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 e1ab2dc29..e0928bc21 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,7 +13,7 @@ watchfiles==0.18.1 # https://github.com/samuelcolvin/watchfiles # Testing # ------------------------------------------------------------------------------ -mypy==1.0.1 # https://github.com/python/mypy +mypy==1.1.1 # https://github.com/python/mypy django-stubs==1.15.0 # https://github.com/typeddjango/django-stubs pytest==7.2.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar From c19957604a212a0aeb5f71c86b087e749ba19216 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 7 Mar 2023 15:40:54 -0500 Subject: [PATCH 21/73] Update myst-parser to 1.0.0 (#4197) --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 661e9c02a..c16401c84 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,3 @@ sphinx==6.1.3 sphinx-rtd-theme==1.2.0 -myst-parser==0.19.1 +myst-parser==1.0.0 From e6014675d276396d20c9fd6b836ab0d4e827292d Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 8 Mar 2023 02:31:52 +0000 Subject: [PATCH 22/73] Release 2023.03.07 --- CHANGELOG.md | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c06100e04..4a678abce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.03.07 + +### Updated +- Update mypy to 1.1.1 ([#4196](https://github.com/cookiecutter/cookiecutter-django/pull/4196)) +- Update django-environ to 0.10.0 ([#4195](https://github.com/cookiecutter/cookiecutter-django/pull/4195)) + ## 2023.03.04 ### Changed diff --git a/setup.py b/setup.py index cd6170bb5..46fe6e06f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.04" +version = "2023.03.07" with open("README.rst") as readme_file: long_description = readme_file.read() From a5d8b4be8864b72c78ef9c257b46837ca0bcc51d Mon Sep 17 00:00:00 2001 From: mpsantos Date: Thu, 9 Mar 2023 07:43:50 -0300 Subject: [PATCH 23/73] Fix the omit configuration for coverage (#4201) --- {{cookiecutter.project_slug}}/setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/setup.cfg b/{{cookiecutter.project_slug}}/setup.cfg index 7ee60215a..e282af36a 100644 --- a/{{cookiecutter.project_slug}}/setup.cfg +++ b/{{cookiecutter.project_slug}}/setup.cfg @@ -35,6 +35,6 @@ ignore_errors = True [coverage:run] include = {{cookiecutter.project_slug}}/** -omit = *migrations*, *tests* +omit = */migrations/*, */tests/* plugins = django_coverage_plugin From 7aba8c4e95e817fe17227318d053e3a07422c0df Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 9 Mar 2023 10:44:26 +0000 Subject: [PATCH 24/73] 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 c15476cc3..e84337123 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1377,5 +1377,10 @@ "name": "Arkadiusz Michał Ryś", "github_login": "arrys", "twitter_username": "" + }, + { + "name": "mpsantos", + "github_login": "mpsantos", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index af99445d4..f78278e34 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1440,6 +1440,13 @@ Listed in alphabetical order. + + mpsantos + + mpsantos + + + Naveen From 522d5219f68b6c7da40d13243ed481072640d2d5 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 9 Mar 2023 12:25:14 -0500 Subject: [PATCH 25/73] Update ipdb to 0.13.13 (#4202) --- {{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 e0928bc21..218cdcaad 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,7 +1,7 @@ -r base.txt Werkzeug[watchdog]==2.2.3 # https://github.com/pallets/werkzeug -ipdb==0.13.11 # https://github.com/gotcha/ipdb +ipdb==0.13.13 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.9.5 # https://github.com/psycopg/psycopg2 {%- else %} From a3781084c1a6d24a52428d15fe6140c09aca58db Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 10 Mar 2023 02:32:50 +0000 Subject: [PATCH 26/73] Release 2023.03.09 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a678abce..00daff8e2 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.03.09 + +### Fixed +- Fix the omit configuration for coverage ([#4201](https://github.com/cookiecutter/cookiecutter-django/pull/4201)) +### Updated +- Update ipdb to 0.13.13 ([#4202](https://github.com/cookiecutter/cookiecutter-django/pull/4202)) + ## 2023.03.07 ### Updated diff --git a/setup.py b/setup.py index 46fe6e06f..e6f1f0b65 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.07" +version = "2023.03.09" with open("README.rst") as readme_file: long_description = readme_file.read() From 1840ed7b395c482a792c1f5f60ac2da6d26441c6 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 13 Mar 2023 03:21:15 -0500 Subject: [PATCH 27/73] Update tox to 4.4.7 (#4207) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5a65d6160..b2e7cedb4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==3.1.1 # Testing # ------------------------------------------------------------------------------ -tox==4.4.6 +tox==4.4.7 pytest==7.2.2 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From d588f71dff05538fca4b4ac9a195cffe2dfc4a70 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 13 Mar 2023 03:21:59 -0500 Subject: [PATCH 28/73] Update django-anymail to 9.1 (#4206) --- .../requirements/production.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 3d725fae7..c79f98431 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -24,21 +24,21 @@ django-storages[google]==1.13.2 # https://github.com/jschneier/django-storages django-storages[azure]==1.13.2 # https://github.com/jschneier/django-storages {%- endif %} {%- if cookiecutter.mail_service == 'Mailgun' %} -django-anymail[mailgun]==9.0 # https://github.com/anymail/django-anymail +django-anymail[mailgun]==9.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Amazon SES' %} -django-anymail[amazon_ses]==9.0 # https://github.com/anymail/django-anymail +django-anymail[amazon_ses]==9.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Mailjet' %} -django-anymail[mailjet]==9.0 # https://github.com/anymail/django-anymail +django-anymail[mailjet]==9.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Mandrill' %} -django-anymail[mandrill]==9.0 # https://github.com/anymail/django-anymail +django-anymail[mandrill]==9.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Postmark' %} -django-anymail[postmark]==9.0 # https://github.com/anymail/django-anymail +django-anymail[postmark]==9.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Sendgrid' %} -django-anymail[sendgrid]==9.0 # https://github.com/anymail/django-anymail +django-anymail[sendgrid]==9.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'SendinBlue' %} -django-anymail[sendinblue]==9.0 # https://github.com/anymail/django-anymail +django-anymail[sendinblue]==9.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'SparkPost' %} -django-anymail[sparkpost]==9.0 # https://github.com/anymail/django-anymail +django-anymail[sparkpost]==9.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Other SMTP' %} -django-anymail==9.0 # https://github.com/anymail/django-anymail +django-anymail==9.1 # https://github.com/anymail/django-anymail {%- endif %} From ef73440c223b9459f8c59bf910c13ef741a58aa2 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 13 Mar 2023 03:23:58 -0500 Subject: [PATCH 29/73] Update uvicorn to 0.21.0 (#4203) --- {{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 1550be1bb..f8ef0f150 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -24,7 +24,7 @@ flower==1.2.0 # https://github.com/mher/flower {%- endif %} {%- endif %} {%- if cookiecutter.use_async == 'y' %} -uvicorn[standard]==0.20.0 # https://github.com/encode/uvicorn +uvicorn[standard]==0.21.0 # https://github.com/encode/uvicorn {%- endif %} # Django From fe947fabfbd4f767ef74e34e42a6e3c256523c7b Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 14 Mar 2023 02:17:49 +0000 Subject: [PATCH 30/73] Release 2023.03.13 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00daff8e2..b938ecc05 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.03.13 + +### Updated +- Update uvicorn to 0.21.0 ([#4203](https://github.com/cookiecutter/cookiecutter-django/pull/4203)) +- Update django-anymail to 9.1 ([#4206](https://github.com/cookiecutter/cookiecutter-django/pull/4206)) +- Update tox to 4.4.7 ([#4207](https://github.com/cookiecutter/cookiecutter-django/pull/4207)) + ## 2023.03.09 ### Fixed diff --git a/setup.py b/setup.py index e6f1f0b65..cf45c28eb 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.09" +version = "2023.03.13" with open("README.rst") as readme_file: long_description = readme_file.read() From f08c81eb2ce23d9a79a619ae08d372782d44473e Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 14 Mar 2023 08:22:37 -0500 Subject: [PATCH 31/73] Update django-celery-beat from 2.4.0 to 2.5.0 (#4208) --- {{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 f8ef0f150..e94221728 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -18,7 +18,7 @@ hiredis==2.2.2 # https://github.com/redis/hiredis-py {%- endif %} {%- if cookiecutter.use_celery == "y" %} celery==5.2.7 # pyup: < 6.0 # https://github.com/celery/celery -django-celery-beat==2.4.0 # https://github.com/celery/django-celery-beat +django-celery-beat==2.5.0 # https://github.com/celery/django-celery-beat {%- if cookiecutter.use_docker == 'y' %} flower==1.2.0 # https://github.com/mher/flower {%- endif %} From 6e078fad858d9095bce2f50fb69c7810dceb4c6d Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 15 Mar 2023 02:23:03 +0000 Subject: [PATCH 32/73] Release 2023.03.14 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b938ecc05..8457fa646 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.03.14 + +### Updated +- Update django-celery-beat to 2.5.0 ([#4208](https://github.com/cookiecutter/cookiecutter-django/pull/4208)) + ## 2023.03.13 ### Updated diff --git a/setup.py b/setup.py index cf45c28eb..762673d9a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.13" +version = "2023.03.14" with open("README.rst") as readme_file: long_description = readme_file.read() From c56088406c4c928e8e8c9f9e3b923000c5e7b4f9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 16 Mar 2023 08:30:32 -0500 Subject: [PATCH 33/73] Update django-allauth from 0.52.0 to 0.53.0 (#4210) --- {{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 e94221728..ff85377e5 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -32,7 +32,7 @@ uvicorn[standard]==0.21.0 # https://github.com/encode/uvicorn django==4.0.10 # pyup: < 4.1 # https://www.djangoproject.com/ django-environ==0.10.0 # https://github.com/joke2k/django-environ django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils -django-allauth==0.52.0 # https://github.com/pennersr/django-allauth +django-allauth==0.53.0 # https://github.com/pennersr/django-allauth django-crispy-forms==2.0 # https://github.com/django-crispy-forms/django-crispy-forms crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5 {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} From 5cd58ce160c8348c73acca5b05d75b68c3f6c369 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 16 Mar 2023 10:37:33 -0500 Subject: [PATCH 34/73] Update uvicorn to 0.21.1 (#4211) --- {{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 ff85377e5..2fff9561f 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -24,7 +24,7 @@ flower==1.2.0 # https://github.com/mher/flower {%- endif %} {%- endif %} {%- if cookiecutter.use_async == 'y' %} -uvicorn[standard]==0.21.0 # https://github.com/encode/uvicorn +uvicorn[standard]==0.21.1 # https://github.com/encode/uvicorn {%- endif %} # Django From d90f16b6479327f6e4acd7695acec29ac241b2f1 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Thu, 16 Mar 2023 16:05:02 +0000 Subject: [PATCH 35/73] Pin base Python Docker images to bugfix (#4194) * Pin base Python Docker images to bugfix Fix #1810 * Skip major & minor versions of Docker images in Dependabot * Remove argument for docs Docker image * Update Dependabot config of generated project --- .github/dependabot.yml | 9 +++++ .../.github/dependabot.yml | 40 +++++++++++-------- .../compose/local/django/Dockerfile | 4 +- .../compose/local/docs/Dockerfile | 4 +- .../compose/production/django/Dockerfile | 4 +- 5 files changed, 35 insertions(+), 26 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d95192f33..d308ff96a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -27,6 +27,9 @@ updates: directory: "{{cookiecutter.project_slug}}/compose/local/django/" schedule: interval: "daily" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major", "version-update:semver-minor"] labels: - "update" @@ -34,6 +37,9 @@ updates: directory: "{{cookiecutter.project_slug}}/compose/local/docs/" schedule: interval: "daily" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major", "version-update:semver-minor"] labels: - "update" @@ -55,6 +61,9 @@ updates: directory: "{{cookiecutter.project_slug}}/compose/production/django/" schedule: interval: "daily" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major", "version-update:semver-minor"] labels: - "update" diff --git a/{{cookiecutter.project_slug}}/.github/dependabot.yml b/{{cookiecutter.project_slug}}/.github/dependabot.yml index 420a63cdc..3f4eefe94 100644 --- a/{{cookiecutter.project_slug}}/.github/dependabot.yml +++ b/{{cookiecutter.project_slug}}/.github/dependabot.yml @@ -6,7 +6,7 @@ updates: # Update GitHub actions in workflows - package-ecosystem: "github-actions" directory: "/" - # Check for updates to GitHub Actions every weekday + # Every weekday schedule: interval: "daily" @@ -19,55 +19,61 @@ updates: - package-ecosystem: "docker" # Look for a `Dockerfile` in the `compose/local/django` directory directory: "compose/local/django/" - # Check for updates to GitHub Actions every weekday + # Every weekday schedule: interval: "daily" + # Ignore minor version updates (3.10 -> 3.11) but update patch versions + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major", "version-update:semver-minor"] - # Enable version updates for Docker - package-ecosystem: "docker" # Look for a `Dockerfile` in the `compose/local/docs` directory directory: "compose/local/docs/" - # Check for updates to GitHub Actions every weekday + # Every weekday schedule: interval: "daily" + # Ignore minor version updates (3.10 -> 3.11) but update patch versions + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major", "version-update:semver-minor"] - # Enable version updates for Docker - package-ecosystem: "docker" # Look for a `Dockerfile` in the `compose/local/node` directory directory: "compose/local/node/" - # Check for updates to GitHub Actions every weekday + # Every weekday schedule: interval: "daily" - # Enable version updates for Docker - package-ecosystem: "docker" # Look for a `Dockerfile` in the `compose/production/aws` directory directory: "compose/production/aws/" - # Check for updates to GitHub Actions every weekday + # Every weekday schedule: interval: "daily" - # Enable version updates for Docker - package-ecosystem: "docker" # Look for a `Dockerfile` in the `compose/production/django` directory directory: "compose/production/django/" - # Check for updates to GitHub Actions every weekday + # Every weekday schedule: interval: "daily" + # Ignore minor version updates (3.10 -> 3.11) but update patch versions + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major", "version-update:semver-minor"] - # Enable version updates for Docker - package-ecosystem: "docker" # Look for a `Dockerfile` in the `compose/production/postgres` directory directory: "compose/production/postgres/" - # Check for updates to GitHub Actions every weekday + # Every weekday schedule: interval: "daily" - # Enable version updates for Docker - package-ecosystem: "docker" # Look for a `Dockerfile` in the `compose/production/traefik` directory directory: "compose/production/traefik/" - # Check for updates to GitHub Actions every weekday + # Every weekday schedule: interval: "daily" @@ -78,7 +84,7 @@ updates: # Look for a `requirements.txt` in the `root` directory # also 'setup.cfg', 'runtime.txt' and 'requirements/*.txt' directory: "/" - # Check for updates to GitHub Actions every weekday + # Every weekday schedule: interval: "daily" @@ -86,9 +92,9 @@ updates: # Enable version updates for javascript/npm - package-ecosystem: "npm" - # Look for a `packages.json' in the `root` directory + # Look for a `packages.json` in the `root` directory directory: "/" - # Check for updates to GitHub Actions every weekday + # Every weekday schedule: interval: "daily" diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index 3ea6b2d4c..36659d31d 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -1,7 +1,5 @@ -ARG PYTHON_VERSION=3.10-slim-bullseye - # define an alias for the specfic python version used in this file. -FROM python:${PYTHON_VERSION} as python +FROM python:3.10.9-slim-bullseye 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 c45d18c95..f52e34d26 100644 --- a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile @@ -1,7 +1,5 @@ -ARG PYTHON_VERSION=3.10-slim-bullseye - # define an alias for the specfic python version used in this file. -FROM python:${PYTHON_VERSION} as python +FROM python:3.10.9-slim-bullseye as python # Python build stage diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index ef80441ba..ac4ca7714 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -1,5 +1,3 @@ -ARG PYTHON_VERSION=3.10-slim-bullseye - {% if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] -%} FROM node:16-bullseye-slim as client-builder @@ -28,7 +26,7 @@ RUN npm run build {%- endif %} # define an alias for the specfic python version used in this file. -FROM python:${PYTHON_VERSION} as python +FROM python:3.10.9-slim-bullseye as python # Python build stage FROM python as python-build-stage From 6554049a8751f8c541f358d7ec8ea9c7612112a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 16:35:28 +0000 Subject: [PATCH 36/73] Bump Docker python image from 3.10.9-slim-bullseye to 3.10.10-slim-bullseye for local Django service (#4212) Bumps python from 3.10.9-slim-bullseye to 3.10.10-slim-bullseye. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- {{cookiecutter.project_slug}}/compose/local/django/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index 36659d31d..4be394f72 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 specfic python version used in this file. -FROM python:3.10.9-slim-bullseye as python +FROM python:3.10.10-slim-bullseye as python # Python build stage FROM python as python-build-stage From 96950f2191094edb890ca5f02f97d191d895636e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 16:35:57 +0000 Subject: [PATCH 37/73] Bump Docker python image from 3.10.9-slim-bullseye to 3.10.10-slim-bullseye for docs (#4213) Bumps python from 3.10.9-slim-bullseye to 3.10.10-slim-bullseye. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- {{cookiecutter.project_slug}}/compose/local/docs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile index f52e34d26..587b8d3ae 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 specfic python version used in this file. -FROM python:3.10.9-slim-bullseye as python +FROM python:3.10.10-slim-bullseye as python # Python build stage From 160510132187e2fd269bca4c798671fff30da456 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 17:13:53 +0000 Subject: [PATCH 38/73] Bump Docker python image from 3.10.9 to 3.10.10 on production Django (#4214) Bumps python from 3.10.9-slim-bullseye to 3.10.10-slim-bullseye. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../compose/production/django/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index ac4ca7714..8ca35f180 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -26,7 +26,7 @@ RUN npm run build {%- endif %} # define an alias for the specfic python version used in this file. -FROM python:3.10.9-slim-bullseye as python +FROM python:3.10.10-slim-bullseye as python # Python build stage FROM python as python-build-stage From 73628a5f48193435480b07f1acc99eaab7ec1595 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 16 Mar 2023 12:15:46 -0500 Subject: [PATCH 39/73] Update sentry-sdk to 1.17.0 (#4215) --- {{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 c79f98431..2104d9ad4 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.9.5 # https://github.com/psycopg/psycopg2 Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.16.0 # https://github.com/getsentry/sentry-python +sentry-sdk==1.17.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.2 # https://github.com/redis/hiredis-py From 9ac1abe194dd2080f80b104f70e5e89d34eaf313 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 16 Mar 2023 12:16:04 -0500 Subject: [PATCH 40/73] Update coverage to 7.2.2 (#4218) --- {{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 218cdcaad..b160eed22 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -30,7 +30,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.1 # https://github.com/nedbat/coveragepy +coverage==7.2.2 # https://github.com/nedbat/coveragepy black==23.1.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From dcea8f1e7bde5e1faf6bd788f0141c53c2dffcd9 Mon Sep 17 00:00:00 2001 From: Hoai-Thu Vuong Date: Fri, 17 Mar 2023 00:17:02 +0700 Subject: [PATCH 41/73] Trim leading and trailing space in `domain_name` and `email` (#4163) * remove trailing space in domain_name and email * Add test for leading and trailing spaces removals * Move magic string and add a comment explaining its role --------- Co-authored-by: Bruno Alla Co-authored-by: Bruno Alla --- cookiecutter.json | 2 +- hooks/pre_gen_project.py | 8 ++++++++ tests/test_cookiecutter_generation.py | 21 ++++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/cookiecutter.json b/cookiecutter.json index cf4da9a45..b24ce4286 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -4,7 +4,7 @@ "description": "Behold My Awesome Project!", "author_name": "Daniel Roy Greenfeld", "domain_name": "example.com", - "email": "{{ cookiecutter.author_name.lower()|replace(' ', '-') }}@example.com", + "email": "{{ cookiecutter.author_name.lower() | trim() |replace(' ', '-') }}@{{ cookiecutter.domain_name.lower() | trim() }}", "version": "0.1.0", "open_source_license": [ "MIT", diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index c3eef1e43..4f4378f58 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -17,6 +17,14 @@ INFO = "\x1b[1;33m [INFO]: " HINT = "\x1b[3;33m" SUCCESS = "\x1b[1;32m [SUCCESS]: " +# The content of this string is evaluated by Jinja, and plays an important role. +# It updates the cookiecutter context to trim leading and trailing spaces +# from domain/email values +""" +{{ cookiecutter.update({ "domain_name": cookiecutter.domain_name | trim }) }} +{{ cookiecutter.update({ "email": cookiecutter.email | trim }) }} +""" + project_slug = "{{ cookiecutter.project_slug }}" if hasattr(project_slug, "isidentifier"): assert ( diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 7628e5e1d..eb6c4710f 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -319,10 +319,29 @@ def test_error_if_incompatible(cookies, context, invalid_context): ], ) def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist): - """.""" context.update({"use_pycharm": use_pycharm}) result = cookies.bake(extra_context=context) with open(f"{result.project_path}/docs/index.rst") as f: has_pycharm_docs = "pycharm/configuration" in f.read() assert has_pycharm_docs is pycharm_docs_exist + + +def test_trim_domain_email(cookies, context): + """Check that leading and trailing spaces are trimmed in domain and email.""" + context.update( + { + "use_docker": "y", + "domain_name": " example.com ", + "email": " me@example.com ", + } + ) + result = cookies.bake(extra_context=context) + + assert result.exit_code == 0 + + prod_django_env = result.project_path / ".envs" / ".production" / ".django" + assert "DJANGO_ALLOWED_HOSTS=.example.com" in prod_django_env.read_text() + + base_settings = result.project_path / "config" / "settings" / "base.py" + assert '"me@example.com"' in base_settings.read_text() From d4a3887e2d1565e7e48608d4ef3443cccf470eeb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 16 Mar 2023 12:29:41 -0500 Subject: [PATCH 42/73] Update django-stubs to 1.16.0 (#4216) --- {{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 b160eed22..c81d4ee07 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -14,7 +14,7 @@ watchfiles==0.18.1 # https://github.com/samuelcolvin/watchfiles # Testing # ------------------------------------------------------------------------------ mypy==1.1.1 # https://github.com/python/mypy -django-stubs==1.15.0 # https://github.com/typeddjango/django-stubs +django-stubs==1.16.0 # https://github.com/typeddjango/django-stubs pytest==7.2.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} From 52b1a59b7f4257dae387c01a3126d2506472066a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 16 Mar 2023 12:30:17 -0500 Subject: [PATCH 43/73] Update djangorestframework-stubs to 1.10.0 (#4217) --- {{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 c81d4ee07..1760bdcfe 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -18,7 +18,7 @@ django-stubs==1.16.0 # https://github.com/typeddjango/django-stubs pytest==7.2.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} -djangorestframework-stubs==1.9.1 # https://github.com/typeddjango/djangorestframework-stubs +djangorestframework-stubs==1.10.0 # https://github.com/typeddjango/djangorestframework-stubs {%- endif %} # Documentation From d53a51c9b3d37a90a931b1faa1ab152c91ba2a57 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 17 Mar 2023 02:21:28 +0000 Subject: [PATCH 44/73] Release 2023.03.16 --- CHANGELOG.md | 17 +++++++++++++++++ setup.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8457fa646..061dd01c4 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.03.16 + +### Changed +- Pin base Python Docker images to bugfix ([#4194](https://github.com/cookiecutter/cookiecutter-django/pull/4194)) +### Fixed +- Trim leading and trailing space in `domain_name` and `email` ([#4163](https://github.com/cookiecutter/cookiecutter-django/pull/4163)) +### Updated +- Update djangorestframework-stubs to 1.10.0 ([#4217](https://github.com/cookiecutter/cookiecutter-django/pull/4217)) +- Update django-stubs to 1.16.0 ([#4216](https://github.com/cookiecutter/cookiecutter-django/pull/4216)) +- Update coverage to 7.2.2 ([#4218](https://github.com/cookiecutter/cookiecutter-django/pull/4218)) +- Update sentry-sdk to 1.17.0 ([#4215](https://github.com/cookiecutter/cookiecutter-django/pull/4215)) +- Bump Docker python image from 3.10.9 to 3.10.10 on production Django ([#4214](https://github.com/cookiecutter/cookiecutter-django/pull/4214)) +- Bump Docker python image from 3.10.9-slim-bullseye to 3.10.10-slim-bullseye for docs ([#4213](https://github.com/cookiecutter/cookiecutter-django/pull/4213)) +- Bump Docker python image from 3.10.9-slim-bullseye to 3.10.10-slim-bullseye for local Django service ([#4212](https://github.com/cookiecutter/cookiecutter-django/pull/4212)) +- Update uvicorn to 0.21.1 ([#4211](https://github.com/cookiecutter/cookiecutter-django/pull/4211)) +- Update django-allauth to 0.53.0 ([#4210](https://github.com/cookiecutter/cookiecutter-django/pull/4210)) + ## 2023.03.14 ### Updated diff --git a/setup.py b/setup.py index 762673d9a..bb49aa4b4 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.14" +version = "2023.03.16" with open("README.rst") as readme_file: long_description = readme_file.read() From d78fe734da8f8721593d215a9e2b378c737e062b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 18 Mar 2023 05:37:38 -0500 Subject: [PATCH 45/73] Update pre-commit to 3.2.0 (#4219) * Update pre-commit from 3.1.1 to 3.2.0 * Update pre-commit from 3.1.1 to 3.2.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 b2e7cedb4..a20ddaa56 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ black==23.1.0 isort==5.12.0 flake8==6.0.0 flake8-isort==6.0.0 -pre-commit==3.1.1 +pre-commit==3.2.0 # Testing # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 1760bdcfe..65cbfc8c0 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -36,7 +36,7 @@ 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 {%- endif %} -pre-commit==3.1.1 # https://github.com/pre-commit/pre-commit +pre-commit==3.2.0 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From b32f579ad82ce905ebfd68f6f674f4364b667e8c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 18 Mar 2023 05:46:31 -0500 Subject: [PATCH 46/73] Update pygithub from 1.58.0 to 1.58.1 (#4220) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a20ddaa56..466975b66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ pyyaml==6.0 # Scripting # ------------------------------------------------------------------------------ -PyGithub==1.58.0 +PyGithub==1.58.1 gitpython==3.1.31 jinja2==3.1.2 requests==2.28.2 From b159194897f75fa2fa062169ad252e7215cedb3d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 18 Mar 2023 17:36:31 -0500 Subject: [PATCH 47/73] Update drf-spectacular from 0.26.0 to 0.26.1 (#4221) --- {{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 2fff9561f..0b29caa89 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -44,7 +44,7 @@ django-redis==5.2.0 # https://github.com/jazzband/django-redis djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework django-cors-headers==3.14.0 # https://github.com/adamchainz/django-cors-headers # DRF-spectacular for api documentation -drf-spectacular==0.26.0 # https://github.com/tfranzel/drf-spectacular +drf-spectacular==0.26.1 # https://github.com/tfranzel/drf-spectacular {%- endif %} {%- if cookiecutter.frontend_pipeline == 'Webpack' %} django-webpack-loader==1.8.1 # https://github.com/django-webpack/django-webpack-loader From 641ffb5bd427eab89bfcfda7de51c777a46f7628 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 19 Mar 2023 02:29:01 +0000 Subject: [PATCH 48/73] Release 2023.03.18 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 061dd01c4..8aea65acb 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.03.18 + +### Updated +- Update drf-spectacular to 0.26.1 ([#4221](https://github.com/cookiecutter/cookiecutter-django/pull/4221)) +- Update pygithub to 1.58.1 ([#4220](https://github.com/cookiecutter/cookiecutter-django/pull/4220)) +- Update pre-commit to 3.2.0 ([#4219](https://github.com/cookiecutter/cookiecutter-django/pull/4219)) + ## 2023.03.16 ### Changed diff --git a/setup.py b/setup.py index bb49aa4b4..c4e337020 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.16" +version = "2023.03.18" with open("README.rst") as readme_file: long_description = readme_file.read() From 93165c4859fa99072e49878316c29c8aa208086b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 20 Mar 2023 07:11:01 -0500 Subject: [PATCH 49/73] Update redis to 4.5.2 (#4222) --- {{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 0b29caa89..d093c48d2 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -12,7 +12,7 @@ argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==6.4.0 # https://github.com/evansd/whitenoise {%- endif %} -redis==4.5.1 # https://github.com/redis/redis-py +redis==4.5.2 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==2.2.2 # https://github.com/redis/hiredis-py {%- endif %} From 95ec685983876611828c577bead28eb09b73e70a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 20 Mar 2023 07:11:18 -0500 Subject: [PATCH 50/73] Update django-allauth to 0.53.1 (#4223) --- {{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 d093c48d2..bb25c87e7 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -32,7 +32,7 @@ uvicorn[standard]==0.21.1 # https://github.com/encode/uvicorn django==4.0.10 # pyup: < 4.1 # https://www.djangoproject.com/ django-environ==0.10.0 # https://github.com/joke2k/django-environ django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils -django-allauth==0.53.0 # https://github.com/pennersr/django-allauth +django-allauth==0.53.1 # https://github.com/pennersr/django-allauth django-crispy-forms==2.0 # https://github.com/django-crispy-forms/django-crispy-forms crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5 {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} From 386330de0e3752884691a1ff23aa76e02aa70581 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 20 Mar 2023 16:46:33 -0500 Subject: [PATCH 51/73] Update sh from 2.0.2 to 2.0.3 (#4224) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 466975b66..85012dcb0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cookiecutter==2.1.1 -sh==2.0.2; sys_platform != "win32" +sh==2.0.3; sys_platform != "win32" binaryornot==0.4.4 # Code quality From ba0a6afa8156bd0dd62dcb167860f7f764f2c36b Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 21 Mar 2023 02:17:59 +0000 Subject: [PATCH 52/73] Release 2023.03.20 --- CHANGELOG.md | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aea65acb..123471e1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.03.20 + +### Updated +- Update django-allauth to 0.53.1 ([#4223](https://github.com/cookiecutter/cookiecutter-django/pull/4223)) +- Update redis to 4.5.2 ([#4222](https://github.com/cookiecutter/cookiecutter-django/pull/4222)) + ## 2023.03.18 ### Updated diff --git a/setup.py b/setup.py index c4e337020..43b269032 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.18" +version = "2023.03.20" with open("README.rst") as readme_file: long_description = readme_file.read() From 8eb30dfae3ece511df113515979132217f4944a6 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 22 Mar 2023 15:33:08 -0500 Subject: [PATCH 53/73] Update pytest-cookies from 0.6.1 to 0.7.0 (#4226) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 85012dcb0..672d40b02 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ pre-commit==3.2.0 # ------------------------------------------------------------------------------ tox==4.4.7 pytest==7.2.2 -pytest-cookies==0.6.1 +pytest-cookies==0.7.0 pytest-instafail==0.4.2 pyyaml==6.0 From 3533b4dd93fae6068438d72119eb4bc0839229d1 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 22 Mar 2023 15:34:03 -0500 Subject: [PATCH 54/73] Update redis from 4.5.2 to 4.5.3 (#4227) --- {{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 bb25c87e7..911b44b3f 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -12,7 +12,7 @@ argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==6.4.0 # https://github.com/evansd/whitenoise {%- endif %} -redis==4.5.2 # https://github.com/redis/redis-py +redis==4.5.3 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==2.2.2 # https://github.com/redis/hiredis-py {%- endif %} From 9c23bb0194581c2dbd0a4d581a5bdf22640bc627 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 23 Mar 2023 02:18:47 +0000 Subject: [PATCH 55/73] Release 2023.03.22 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 123471e1f..6563022af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.03.22 + +### Updated +- Update redis to 4.5.3 ([#4227](https://github.com/cookiecutter/cookiecutter-django/pull/4227)) + ## 2023.03.20 ### Updated diff --git a/setup.py b/setup.py index 43b269032..fe04abc05 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.20" +version = "2023.03.22" with open("README.rst") as readme_file: long_description = readme_file.read() From 68133e83547a24f3460846c43ec07f38f0b52469 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Mar 2023 17:15:43 +0000 Subject: [PATCH 56/73] Bump traefik from 2.9.8 to 2.9.9 (#4225) Bumps traefik from 2.9.8 to 2.9.9. --- 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 2365c4c49..2b146cc63 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile @@ -1,4 +1,4 @@ -FROM traefik:2.9.8 +FROM traefik:2.9.9 RUN mkdir -p /etc/traefik/acme \ && touch /etc/traefik/acme/acme.json \ && chmod 600 /etc/traefik/acme/acme.json From c2b7e65d81f72fc3d3492a43e6348d1f9ca949e3 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 24 Mar 2023 02:19:52 +0000 Subject: [PATCH 57/73] Release 2023.03.23 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6563022af..07fa9122a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.03.23 + +### Updated +- Bump traefik from 2.9.8 to 2.9.9 ([#4225](https://github.com/cookiecutter/cookiecutter-django/pull/4225)) + ## 2023.03.22 ### Updated diff --git a/setup.py b/setup.py index fe04abc05..8ec8f4281 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.22" +version = "2023.03.23" with open("README.rst") as readme_file: long_description = readme_file.read() From ad9ea8823293467aa67b1770b65844a53fbf36a9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 25 Mar 2023 09:58:44 -0500 Subject: [PATCH 58/73] Update pytz from 2022.7.1 to 2023.2 (#4228) --- {{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 911b44b3f..463008e09 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,4 +1,4 @@ -pytz==2022.7.1 # https://github.com/stub42/pytz +pytz==2023.2 # https://github.com/stub42/pytz python-slugify==8.0.1 # https://github.com/un33k/python-slugify Pillow==9.4.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} From 2517d037ded11082207085952d7d2cd7165759e5 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 26 Mar 2023 02:22:45 +0000 Subject: [PATCH 59/73] Release 2023.03.25 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07fa9122a..91b07b4e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.03.25 + +### Updated +- Update pytz to 2023.2 ([#4228](https://github.com/cookiecutter/cookiecutter-django/pull/4228)) + ## 2023.03.23 ### Updated diff --git a/setup.py b/setup.py index 8ec8f4281..503028691 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.23" +version = "2023.03.25" with open("README.rst") as readme_file: long_description = readme_file.read() From 8156efd583a1daef98f098db6a8946fef8d1894f Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 26 Mar 2023 12:44:19 -0500 Subject: [PATCH 60/73] Update pre-commit to 3.2.1 (#4229) * Update pre-commit from 3.2.0 to 3.2.1 * Update pre-commit from 3.2.0 to 3.2.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 672d40b02..658f39cb1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ black==23.1.0 isort==5.12.0 flake8==6.0.0 flake8-isort==6.0.0 -pre-commit==3.2.0 +pre-commit==3.2.1 # Testing # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 65cbfc8c0..5baf9111d 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -36,7 +36,7 @@ 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 {%- endif %} -pre-commit==3.2.0 # https://github.com/pre-commit/pre-commit +pre-commit==3.2.1 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From 3ca2c87a17b62428190a9076d9bf8c71524eecd2 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 26 Mar 2023 17:55:44 -0500 Subject: [PATCH 61/73] Update tox from 4.4.7 to 4.4.8 (#4231) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 658f39cb1..c4ab1014e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==3.2.1 # Testing # ------------------------------------------------------------------------------ -tox==4.4.7 +tox==4.4.8 pytest==7.2.2 pytest-cookies==0.7.0 pytest-instafail==0.4.2 From b1d06f32a06b8317fa392206308d96712c2d561c Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 27 Mar 2023 02:19:11 +0000 Subject: [PATCH 62/73] Release 2023.03.26 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91b07b4e1..92bc1b70f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.03.26 + +### Updated +- Update pre-commit to 3.2.1 ([#4229](https://github.com/cookiecutter/cookiecutter-django/pull/4229)) + ## 2023.03.25 ### Updated diff --git a/setup.py b/setup.py index 503028691..b3312a217 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.25" +version = "2023.03.26" with open("README.rst") as readme_file: long_description = readme_file.read() From 6475dffbd8bae9ac4774139955ca33caa2cc8fd2 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 27 Mar 2023 18:00:22 -0500 Subject: [PATCH 63/73] Update watchfiles from 0.18.1 to 0.19.0 (#4232) --- {{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 5baf9111d..a9de59141 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -8,7 +8,7 @@ psycopg2==2.9.5 # https://github.com/psycopg/psycopg2 psycopg2-binary==2.9.5 # https://github.com/psycopg/psycopg2 {%- endif %} {%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %} -watchfiles==0.18.1 # https://github.com/samuelcolvin/watchfiles +watchfiles==0.19.0 # https://github.com/samuelcolvin/watchfiles {%- endif %} # Testing From 53029732824ea9e411e7a9ae4fe9fe0b8446ae64 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 28 Mar 2023 02:20:35 +0000 Subject: [PATCH 64/73] Release 2023.03.27 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92bc1b70f..4767aa20e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.03.27 + +### Updated +- Update watchfiles to 0.19.0 ([#4232](https://github.com/cookiecutter/cookiecutter-django/pull/4232)) + ## 2023.03.26 ### Updated diff --git a/setup.py b/setup.py index b3312a217..66349a791 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.26" +version = "2023.03.27" with open("README.rst") as readme_file: long_description = readme_file.read() From d77b33df434dcda80735a128b6ed6ccdf1a05e0b Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 28 Mar 2023 23:38:48 +0100 Subject: [PATCH 65/73] Update code of conduct link --- CODE_OF_CONDUCT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 8a5fc4158..a7b21223b 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,3 @@ ## Code of Conduct -Everyone who interacts in the Cookiecutter project's codebase, issue trackers, chat rooms, and mailing lists is expected to follow the [PyPA Code of Conduct](https://www.pypa.io/en/latest/code-of-conduct/). +Everyone who interacts in the Cookiecutter project's codebase, issue trackers, chat rooms, and mailing lists is expected to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/) From 43c32961e5bf794765379f0d9f5c5e2b968b5625 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 29 Mar 2023 10:53:29 -0500 Subject: [PATCH 66/73] Update black to 23.3.0 (#4236) * Update black from 23.1.0 to 23.3.0 * Update black from 23.1.0 to 23.3.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 c4ab1014e..4b45e7f81 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ -black==23.1.0 +black==23.3.0 isort==5.12.0 flake8==6.0.0 flake8-isort==6.0.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index a9de59141..0b3a39d97 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.2 # https://github.com/nedbat/coveragepy -black==23.1.0 # https://github.com/psf/black +black==23.3.0 # https://github.com/psf/black 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 fffc2a2fa60e38a25fd646436b60c737fe921d27 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 29 Mar 2023 16:53:39 +0100 Subject: [PATCH 67/73] Auto-update pre-commit hooks (#4235) Co-authored-by: browniebroke --- .pre-commit-config.yaml | 2 +- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 438de52b4..2dc0f81cb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: exclude: hooks/ - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - id: black diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index a8cdb1357..073df732e 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: args: [--py310-plus] - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - id: black From 4ed32dde32ffa0f08a246fdc27b35317623ff21e Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 29 Mar 2023 10:54:44 -0500 Subject: [PATCH 68/73] Update pytz to 2023.3 (#4238) --- {{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 463008e09..d040f45d7 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,4 +1,4 @@ -pytz==2023.2 # https://github.com/stub42/pytz +pytz==2023.3 # https://github.com/stub42/pytz python-slugify==8.0.1 # https://github.com/un33k/python-slugify Pillow==9.4.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} From 694a29794ddc2d11aba5fdf98943eac8a926b18a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 29 Mar 2023 12:30:37 -0500 Subject: [PATCH 69/73] Update redis to 4.5.4 (#4239) --- {{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 d040f45d7..1a3766e6e 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -12,7 +12,7 @@ argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==6.4.0 # https://github.com/evansd/whitenoise {%- endif %} -redis==4.5.3 # https://github.com/redis/redis-py +redis==4.5.4 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==2.2.2 # https://github.com/redis/hiredis-py {%- endif %} From 6c702a50de2fec1e069f8405c27b2ad5da76c65a Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 30 Mar 2023 02:21:03 +0000 Subject: [PATCH 70/73] Release 2023.03.29 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4767aa20e..c339a19b5 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.03.29 + +### Updated +- Update redis to 4.5.4 ([#4239](https://github.com/cookiecutter/cookiecutter-django/pull/4239)) +- Update pytz to 2023.3 ([#4238](https://github.com/cookiecutter/cookiecutter-django/pull/4238)) +- Update black to 23.3.0 ([#4236](https://github.com/cookiecutter/cookiecutter-django/pull/4236)) + ## 2023.03.27 ### Updated diff --git a/setup.py b/setup.py index 66349a791..695baf8bc 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.03.27" +version = "2023.03.29" with open("README.rst") as readme_file: long_description = readme_file.read() From 58de1db4a0c716106e44e247f5a8502d5dde7189 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 1 Apr 2023 06:32:09 -0500 Subject: [PATCH 71/73] Update django-allauth from 0.53.1 to 0.54.0 (#4241) --- {{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 1a3766e6e..392b49abf 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -32,7 +32,7 @@ uvicorn[standard]==0.21.1 # https://github.com/encode/uvicorn django==4.0.10 # pyup: < 4.1 # https://www.djangoproject.com/ django-environ==0.10.0 # https://github.com/joke2k/django-environ django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils -django-allauth==0.53.1 # https://github.com/pennersr/django-allauth +django-allauth==0.54.0 # https://github.com/pennersr/django-allauth django-crispy-forms==2.0 # https://github.com/django-crispy-forms/django-crispy-forms crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5 {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} From 28f05920cf407c63e7361d1ffb5c0d7ccf31b0f8 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 1 Apr 2023 06:32:20 -0500 Subject: [PATCH 72/73] Update pillow from 9.4.0 to 9.5.0 (#4242) --- {{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 392b49abf..fb3559194 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,6 +1,6 @@ pytz==2023.3 # https://github.com/stub42/pytz python-slugify==8.0.1 # https://github.com/un33k/python-slugify -Pillow==9.4.0 # https://github.com/python-pillow/Pillow +Pillow==9.5.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} {%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %} rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin From cf7f919d422fb910fb3cdfba2bd38b25812b5607 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 1 Apr 2023 06:32:32 -0500 Subject: [PATCH 73/73] Update pytest-instafail from 0.4.2 to 0.5.0 (#4240) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4b45e7f81..d635f79a9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ pre-commit==3.2.1 tox==4.4.8 pytest==7.2.2 pytest-cookies==0.7.0 -pytest-instafail==0.4.2 +pytest-instafail==0.5.0 pyyaml==6.0 # Scripting