From 040537a5d69ea96b245b24214105da740f8bca53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 10:00:06 +0000 Subject: [PATCH 0001/1166] Auto-update pre-commit hooks (#3942) 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 10af89e41..e31055bb1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - repo: https://github.com/asottile/pyupgrade - rev: v3.2.0 + rev: v3.2.2 hooks: - id: pyupgrade args: [--py310-plus] diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 5cf841bc3..433d97de9 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-yaml - repo: https://github.com/asottile/pyupgrade - rev: v3.2.0 + rev: v3.2.2 hooks: - id: pyupgrade args: [--py310-plus] From aa6cc603e24616d6e16761e1596153b0d0f04141 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 12 Nov 2022 02:41:33 +0000 Subject: [PATCH 0002/1166] Release 2022.11.11 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc6394eac..88f2ab45b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.11.11 + +### Updated +- Auto-update pre-commit hooks ([#3942](https://github.com/cookiecutter/cookiecutter-django/pull/3942)) + ## 2022.11.07 ### Updated diff --git a/setup.py b/setup.py index 8100edc12..ea0d169e3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.11.07" +version = "2022.11.11" with open("README.rst") as readme_file: long_description = readme_file.read() From 27655eca7ee1a9647ff67af2eed3b419a766aff6 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 14 Nov 2022 00:51:28 -0800 Subject: [PATCH 0003/1166] Update tox from 3.27.0 to 3.27.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ea9671876..783edeb18 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.20.0 # Testing # ------------------------------------------------------------------------------ -tox==3.27.0 +tox==3.27.1 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From 466bb798aa4b44787649bc1b9280bd4c1f9642d5 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 15 Nov 2022 20:35:34 -0600 Subject: [PATCH 0004/1166] Update django-model-utils from 4.2.0 to 4.3.1 --- {{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 af9c4b52e..1a8ed77ae 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -31,7 +31,7 @@ uvicorn[standard]==0.19.0 # https://github.com/encode/uvicorn # ------------------------------------------------------------------------------ django==4.0.8 # pyup: < 4.1 # https://www.djangoproject.com/ django-environ==0.9.0 # https://github.com/joke2k/django-environ -django-model-utils==4.2.0 # https://github.com/jazzband/django-model-utils +django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils django-allauth==0.51.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5 From 7bdc6aea668464216b77d9492dd3ba7631a299fe Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 18 Nov 2022 14:21:59 -0600 Subject: [PATCH 0005/1166] Update python-slugify from 6.1.2 to 7.0.0 --- {{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 af9c4b52e..3fa109387 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,5 +1,5 @@ pytz==2022.6 # https://github.com/stub42/pytz -python-slugify==6.1.2 # https://github.com/un33k/python-slugify +python-slugify==7.0.0 # https://github.com/un33k/python-slugify Pillow==9.3.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} {%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %} From 81ea9775daf987b39dc54b106884595a81cb044c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 20 Nov 2022 07:32:12 -0600 Subject: [PATCH 0006/1166] Update flake8-isort from 5.0.0 to 5.0.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ea9671876..262462cda 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ binaryornot==0.4.4 black==22.10.0 isort==5.10.1 flake8==5.0.4 -flake8-isort==5.0.0 +flake8-isort==5.0.3 pre-commit==2.20.0 # Testing From 827e1364d1bb0df69c5b2b200ebe70128cdb1825 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 20 Nov 2022 07:32:13 -0600 Subject: [PATCH 0007/1166] Update flake8-isort from 5.0.0 to 5.0.3 --- {{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 130cb24cc..e7674ce93 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -29,7 +29,7 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ flake8==5.0.4 # https://github.com/PyCQA/flake8 -flake8-isort==5.0.0 # https://github.com/gforcada/flake8-isort +flake8-isort==5.0.3 # https://github.com/gforcada/flake8-isort coverage==6.5.0 # https://github.com/nedbat/coveragepy black==22.10.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django From 202da796b36afbc7f9aabc88960ba301ff3b5acd Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 20 Nov 2022 08:12:28 -0600 Subject: [PATCH 0008/1166] Update uvicorn from 0.19.0 to 0.20.0 --- {{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 af9c4b52e..3d0da64f9 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.19.0 # https://github.com/encode/uvicorn +uvicorn[standard]==0.20.0 # https://github.com/encode/uvicorn {%- endif %} # Django From f70b397c8672fad1a71b1e08872625c57f1d8f62 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 22 Nov 2022 02:58:49 -0600 Subject: [PATCH 0009/1166] Update redis from 4.3.4 to 4.3.5 --- {{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 af9c4b52e..9073d7034 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.2.0 # https://github.com/evansd/whitenoise {%- endif %} -redis==4.3.4 # https://github.com/redis/redis-py +redis==4.3.5 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==2.0.0 # https://github.com/redis/hiredis-py {%- endif %} From 0e91f40969fd7a0cdcf59be2f03f8e08dc43bce5 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 22 Nov 2022 07:59:10 -0600 Subject: [PATCH 0010/1166] Update sentry-sdk from 1.10.1 to 1.11.1 --- {{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 e2c2046d2..275633dd4 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.10.1 # https://github.com/getsentry/sentry-python +sentry-sdk==1.11.1 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.0.0 # https://github.com/redis/hiredis-py From 7d517dc6775a6d3cf7c231ec38468108c259b640 Mon Sep 17 00:00:00 2001 From: adinhodovic Date: Tue, 22 Nov 2022 20:08:02 +0100 Subject: [PATCH 0011/1166] feat(celery): Send task events for Celery by default Is useful for e.g Flower and Celery-exporter --- {{cookiecutter.project_slug}}/config/settings/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 9cd6a081b..b8368b6cb 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -299,6 +299,8 @@ CELERY_TASK_TIME_LIMIT = 5 * 60 CELERY_TASK_SOFT_TIME_LIMIT = 60 # https://docs.celeryq.dev/en/stable/userguide/configuration.html#beat-scheduler CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler" +# https://docs.celeryq.dev/en/stable/userguide/configuration.html#worker-send-task-events +CELERY_WORKER_SEND_TASK_EVENTS = True {%- endif %} # django-allauth From 65ac3d8a3f2e9ec5e66c21ba23c1e589ef7b29c7 Mon Sep 17 00:00:00 2001 From: luzfcb Date: Tue, 22 Nov 2022 19:20:22 +0000 Subject: [PATCH 0012/1166] 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 190b81d38..bdbc76158 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1302,5 +1302,10 @@ "name": "Abe Hanoka", "github_login": "abe-101", "twitter_username": "abe__101" + }, + { + "name": "Adin Hodovic", + "github_login": "adinhodovic", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 86ee9251c..29db8acb3 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -166,6 +166,13 @@ Listed in alphabetical order. + + Adin Hodovic + + adinhodovic + + + Agam Dua From de48e315174fc38dd4c925528bad907c00822981 Mon Sep 17 00:00:00 2001 From: adinhodovic Date: Tue, 22 Nov 2022 20:28:52 +0100 Subject: [PATCH 0013/1166] feat(celery): Enable sending the sent task event by default --- {{cookiecutter.project_slug}}/config/settings/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index b8368b6cb..b1d11cd3d 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -301,6 +301,8 @@ CELERY_TASK_SOFT_TIME_LIMIT = 60 CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler" # https://docs.celeryq.dev/en/stable/userguide/configuration.html#worker-send-task-events CELERY_WORKER_SEND_TASK_EVENTS = True +# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std-setting-task_send_sent_event +CELERY_TASK_SEND_SENT_EVENT = True {%- endif %} # django-allauth From d98aad07109fe02613cab9850378eefc9f350748 Mon Sep 17 00:00:00 2001 From: Leifur Halldor Asgeirsson Date: Tue, 22 Nov 2022 14:59:34 -0500 Subject: [PATCH 0014/1166] Remove platform from compose file (#3957) --- {{cookiecutter.project_slug}}/local.yml | 2 -- {{cookiecutter.project_slug}}/production.yml | 1 - 2 files changed, 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/local.yml b/{{cookiecutter.project_slug}}/local.yml index fb203acd6..33a8db07a 100644 --- a/{{cookiecutter.project_slug}}/local.yml +++ b/{{cookiecutter.project_slug}}/local.yml @@ -11,7 +11,6 @@ services: dockerfile: ./compose/local/django/Dockerfile image: {{ cookiecutter.project_slug }}_local_django container_name: {{ cookiecutter.project_slug }}_local_django - platform: linux/x86_64 depends_on: - postgres {%- if cookiecutter.use_celery == 'y' %} @@ -44,7 +43,6 @@ services: docs: image: {{ cookiecutter.project_slug }}_local_docs container_name: {{ cookiecutter.project_slug }}_local_docs - platform: linux/x86_64 build: context: . dockerfile: ./compose/local/docs/Dockerfile diff --git a/{{cookiecutter.project_slug}}/production.yml b/{{cookiecutter.project_slug}}/production.yml index 4c1d64c20..ea4292a0d 100644 --- a/{{cookiecutter.project_slug}}/production.yml +++ b/{{cookiecutter.project_slug}}/production.yml @@ -11,7 +11,6 @@ services: context: . dockerfile: ./compose/production/django/Dockerfile image: {{ cookiecutter.project_slug }}_production_django - platform: linux/x86_64 depends_on: - postgres - redis From a78b052bcce3a67ff7bc2634fcd4590cb1e0bb77 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 22 Nov 2022 19:59:59 +0000 Subject: [PATCH 0015/1166] 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 bdbc76158..c8da987a2 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1307,5 +1307,10 @@ "name": "Adin Hodovic", "github_login": "adinhodovic", "twitter_username": "" + }, + { + "name": "Leifur Halldor Asgeirsson", + "github_login": "leifurhauks", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 29db8acb3..000e5fb1f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1160,6 +1160,13 @@ Listed in alphabetical order. + + Leifur Halldor Asgeirsson + + leifurhauks + + + Leo won From b5ad2fc232b136dc7d249c0a41bbf941b7247954 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Tue, 22 Nov 2022 17:51:31 -0500 Subject: [PATCH 0016/1166] Remove USE_L10N due to deprecation (#3960) --- {{cookiecutter.project_slug}}/config/settings/base.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index b8368b6cb..62c4b4327 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -30,8 +30,6 @@ LANGUAGE_CODE = "en-us" SITE_ID = 1 # https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n USE_I18N = True -# https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n -USE_L10N = True # https://docs.djangoproject.com/en/dev/ref/settings/#use-tz USE_TZ = True # https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths From 3e32780ccf39c1128a0ab1d2dc68d7e61b32096d Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 23 Nov 2022 02:34:55 +0000 Subject: [PATCH 0017/1166] Release 2022.11.22 --- CHANGELOG.md | 13 +++++++++++++ setup.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88f2ab45b..85a0cb793 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,19 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.11.22 + +### Changed +- Remove USE_L10N due to deprecation ([#3960](https://github.com/cookiecutter/cookiecutter-django/pull/3960)) +- Remove platform from compose file ([#3957](https://github.com/cookiecutter/cookiecutter-django/pull/3957)) +- feat(celery): Send task events for Celery by default ([#3959](https://github.com/cookiecutter/cookiecutter-django/pull/3959)) +### Updated +- Update python-slugify to 7.0.0 ([#3950](https://github.com/cookiecutter/cookiecutter-django/pull/3950)) +- Update redis to 4.3.5 ([#3954](https://github.com/cookiecutter/cookiecutter-django/pull/3954)) +- Update sentry-sdk to 1.11.1 ([#3955](https://github.com/cookiecutter/cookiecutter-django/pull/3955)) +- Update uvicorn to 0.20.0 ([#3953](https://github.com/cookiecutter/cookiecutter-django/pull/3953)) +- Update tox to 3.27.1 ([#3945](https://github.com/cookiecutter/cookiecutter-django/pull/3945)) + ## 2022.11.11 ### Updated diff --git a/setup.py b/setup.py index ea0d169e3..55cc3d400 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.11.11" +version = "2022.11.22" with open("README.rst") as readme_file: long_description = readme_file.read() From 51f4374a8ab88cffd20b13cc36be10d35cfd79b0 Mon Sep 17 00:00:00 2001 From: Chao Yang Wu Date: Wed, 23 Nov 2022 22:51:20 +0800 Subject: [PATCH 0018/1166] Fix graceful shutdown of local dev containers and use watchfiles for beat + flower (#3925) Co-authored-by: Bruno Alla Co-authored-by: Bruno Alla --- .../compose/local/django/celery/beat/start | 2 +- .../compose/local/django/celery/flower/start | 9 +++------ .../compose/local/django/celery/worker/start | 2 +- {{cookiecutter.project_slug}}/compose/local/django/start | 4 ++-- {{cookiecutter.project_slug}}/compose/local/docs/start | 2 +- .../compose/production/django/start | 4 ++-- 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/celery/beat/start b/{{cookiecutter.project_slug}}/compose/local/django/celery/beat/start index c04a7365e..61f83968b 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/celery/beat/start +++ b/{{cookiecutter.project_slug}}/compose/local/django/celery/beat/start @@ -5,4 +5,4 @@ set -o nounset rm -f './celerybeat.pid' -celery -A config.celery_app beat -l INFO +exec watchfiles celery.__main__.main --args '-A config.celery_app beat -l INFO' diff --git a/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start b/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start index bd3c9f2fd..8ff56d118 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start +++ b/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start @@ -3,9 +3,6 @@ set -o errexit set -o nounset - -celery \ - -A config.celery_app \ - -b "${CELERY_BROKER_URL}" \ - flower \ - --basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}" +exec watchfiles celery.__.main__.main \ + --args \ + "-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\"" diff --git a/{{cookiecutter.project_slug}}/compose/local/django/celery/worker/start b/{{cookiecutter.project_slug}}/compose/local/django/celery/worker/start index 4ddcfa137..16341fdd1 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/celery/worker/start +++ b/{{cookiecutter.project_slug}}/compose/local/django/celery/worker/start @@ -4,4 +4,4 @@ set -o errexit set -o nounset -watchfiles celery.__main__.main --args '-A config.celery_app worker -l INFO' +exec watchfiles celery.__main__.main --args '-A config.celery_app worker -l INFO' diff --git a/{{cookiecutter.project_slug}}/compose/local/django/start b/{{cookiecutter.project_slug}}/compose/local/django/start index 3fe547357..ec57dc8e4 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/start +++ b/{{cookiecutter.project_slug}}/compose/local/django/start @@ -7,7 +7,7 @@ set -o nounset python manage.py migrate {%- if cookiecutter.use_async == 'y' %} -uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html' +exec uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html' {%- else %} -python manage.py runserver_plus 0.0.0.0:8000 +exec python manage.py runserver_plus 0.0.0.0:8000 {%- endif %} diff --git a/{{cookiecutter.project_slug}}/compose/local/docs/start b/{{cookiecutter.project_slug}}/compose/local/docs/start index fd2e0de6a..96a94f566 100644 --- a/{{cookiecutter.project_slug}}/compose/local/docs/start +++ b/{{cookiecutter.project_slug}}/compose/local/docs/start @@ -4,4 +4,4 @@ set -o errexit set -o pipefail set -o nounset -make livehtml +exec make livehtml diff --git a/{{cookiecutter.project_slug}}/compose/production/django/start b/{{cookiecutter.project_slug}}/compose/production/django/start index 2ba79501c..73f686bd7 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/start +++ b/{{cookiecutter.project_slug}}/compose/production/django/start @@ -28,7 +28,7 @@ if compress_enabled; then fi {%- endif %} {%- if cookiecutter.use_async == 'y' %} -/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app -k uvicorn.workers.UvicornWorker +exec /usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app -k uvicorn.workers.UvicornWorker {%- else %} -/usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app +exec /usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app {%- endif %} From c35a074d720c252986bae05c6da038a566ea3706 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Nov 2022 14:51:51 +0000 Subject: [PATCH 0019/1166] Bump stefanzweifel/git-auto-commit-action from 4.15.3 to 4.15.4 (#3940) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/update-contributors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml index ee0c547e1..571bdcd02 100644 --- a/.github/workflows/update-contributors.yml +++ b/.github/workflows/update-contributors.yml @@ -31,7 +31,7 @@ jobs: run: python scripts/update_contributors.py - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4.15.3 + uses: stefanzweifel/git-auto-commit-action@v4.15.4 with: commit_message: Update Contributors file_pattern: CONTRIBUTORS.md .github/contributors.json From 5ad6cb48c5a7ba03e866ae0159116bd08ccf6234 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 24 Nov 2022 02:32:07 +0000 Subject: [PATCH 0020/1166] Release 2022.11.23 --- CHANGELOG.md | 10 ++++++++++ setup.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85a0cb793..24dbdc41f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.11.23 + +### Changed +- Fix graceful shutdown of local dev containers and use watchfiles for beat + flower ([#3925](https://github.com/cookiecutter/cookiecutter-django/pull/3925)) +- feat(celery): Enable sending the sent task event by default ([#3961](https://github.com/cookiecutter/cookiecutter-django/pull/3961)) +### Updated +- Bump stefanzweifel/git-auto-commit-action from 4.15.3 to 4.15.4 ([#3940](https://github.com/cookiecutter/cookiecutter-django/pull/3940)) +- Update django-model-utils to 4.3.1 ([#3948](https://github.com/cookiecutter/cookiecutter-django/pull/3948)) +- Update flake8-isort to 5.0.3 ([#3952](https://github.com/cookiecutter/cookiecutter-django/pull/3952)) + ## 2022.11.22 ### Changed diff --git a/setup.py b/setup.py index 55cc3d400..d097c04e5 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.11.22" +version = "2022.11.23" with open("README.rst") as readme_file: long_description = readme_file.read() From b21f50e22b465bb5e01608c46738b9c022080243 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 24 Nov 2022 08:17:41 +0000 Subject: [PATCH 0021/1166] Auto-update pre-commit hooks (#3963) Co-authored-by: browniebroke --- .pre-commit-config.yaml | 4 ++-- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e31055bb1..df197108f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_stages: [commit] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: check-yaml @@ -26,7 +26,7 @@ repos: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 6.0.0 hooks: - id: flake8 diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 433d97de9..e53422ed3 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_stages: [commit] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -26,7 +26,7 @@ repos: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 6.0.0 hooks: - id: flake8 args: ["--config=setup.cfg"] From fec7ba3aa89332f1056d1835913c12e7d4d3eb1a Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 25 Nov 2022 02:33:31 +0000 Subject: [PATCH 0022/1166] Release 2022.11.24 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24dbdc41f..2b8be74db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.11.24 + +### Updated +- Auto-update pre-commit hooks ([#3963](https://github.com/cookiecutter/cookiecutter-django/pull/3963)) + ## 2022.11.23 ### Changed diff --git a/setup.py b/setup.py index d097c04e5..7a2223092 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.11.23" +version = "2022.11.24" with open("README.rst") as readme_file: long_description = readme_file.read() From 77695c7c10a902b8345e75a2a4cf06fb2d8971ad Mon Sep 17 00:00:00 2001 From: David Date: Sat, 26 Nov 2022 04:08:39 -0700 Subject: [PATCH 0023/1166] Fix typo in flower start for watching celery (#3966) --- .../compose/local/django/celery/flower/start | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start b/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start index 8ff56d118..ac3cc6b36 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start +++ b/{{cookiecutter.project_slug}}/compose/local/django/celery/flower/start @@ -3,6 +3,6 @@ set -o errexit set -o nounset -exec watchfiles celery.__.main__.main \ +exec watchfiles celery.__main__.main \ --args \ "-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\"" From fd45bb18ea992423c79a2878d02620e190b1ac2e Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 26 Nov 2022 11:09:10 +0000 Subject: [PATCH 0024/1166] 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 c8da987a2..3d4ec0488 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1312,5 +1312,10 @@ "name": "Leifur Halldor Asgeirsson", "github_login": "leifurhauks", "twitter_username": "" + }, + { + "name": "David", + "github_login": "buckldav", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 000e5fb1f..028ed7231 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -607,6 +607,13 @@ Listed in alphabetical order. + + David + + buckldav + + + David Díaz From 0a8b15615a51f09083ce5386c4e09c5fe2ed2757 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 27 Nov 2022 02:34:17 +0000 Subject: [PATCH 0025/1166] Release 2022.11.26 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b8be74db..ba72b2cf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.11.26 + +### Changed +- Fix typo in flower start for watching celery ([#3966](https://github.com/cookiecutter/cookiecutter-django/pull/3966)) + ## 2022.11.24 ### Updated diff --git a/setup.py b/setup.py index 7a2223092..6f2fde261 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.11.24" +version = "2022.11.26" with open("README.rst") as readme_file: long_description = readme_file.read() From 5ca7ae1c4306da865acdedb0899ad35cda471d79 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 30 Nov 2022 09:37:03 +0000 Subject: [PATCH 0026/1166] Auto-update pre-commit hooks (#3970) 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 df197108f..75d2409cd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - repo: https://github.com/asottile/pyupgrade - rev: v3.2.2 + rev: v3.2.3 hooks: - id: pyupgrade args: [--py310-plus] diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index e53422ed3..e8e69627d 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-yaml - repo: https://github.com/asottile/pyupgrade - rev: v3.2.2 + rev: v3.2.3 hooks: - id: pyupgrade args: [--py310-plus] From 49b3bb8ffe6311b877409886ecfdb90d8b4beb15 Mon Sep 17 00:00:00 2001 From: rguptar <69279773+rguptar@users.noreply.github.com> Date: Wed, 30 Nov 2022 10:26:58 -0800 Subject: [PATCH 0027/1166] Add Azure Storage as an option to serve static and media files (#3967) Fix https://github.com/cookiecutter/cookiecutter-django/issues/2301 --- README.md | 4 ++-- cookiecutter.json | 1 + docs/project-generation-options.rst | 4 +++- docs/settings.rst | 3 +++ hooks/pre_gen_project.py | 7 ++----- tests/test_cookiecutter_generation.py | 14 +++++++++++++- .../.envs/.production/.django | 6 ++++++ .../config/settings/production.py | 12 +++++++++++- .../requirements/production.txt | 2 ++ .../utils/storages.py | 11 +++++++++++ 10 files changed, 54 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9f2af6d37..27fc6e0e1 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ production-ready Django projects quickly. - Optional basic ASGI setup for Websockets - Optional custom static build using Gulp and livereload - 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 or Google Cloud Storage +- Media storage using Amazon S3, Google Cloud Storage or Azure Storage - 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/) @@ -41,7 +41,7 @@ production-ready Django projects quickly. *These features can be enabled during initial project setup.* -- Serve static files from Amazon S3, Google Cloud Storage or [Whitenoise](https://whitenoise.readthedocs.io/) +- Serve static files from Amazon S3, Google Cloud Storage, Azure Storage or [Whitenoise](https://whitenoise.readthedocs.io/) - Configuration for [Celery](https://docs.celeryq.dev) and [Flower](https://github.com/mher/flower) (the latter in Docker setup only) - Integration with [MailHog](https://github.com/mailhog/MailHog) for local email testing - Integration with [Sentry](https://sentry.io/welcome/) for error logging diff --git a/cookiecutter.json b/cookiecutter.json index 90d084b3a..970411013 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -27,6 +27,7 @@ "cloud_provider": [ "AWS", "GCP", + "Azure", "None" ], "mail_service": [ diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 2d8103cf2..0560badd3 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -66,7 +66,8 @@ cloud_provider: 1. AWS_ 2. GCP_ - 3. None + 3. Azure_ + 4. None Note that if you choose no cloud provider, media files won't work. @@ -147,6 +148,7 @@ debug: .. _AWS: https://aws.amazon.com/s3/ .. _GCP: https://cloud.google.com/storage/ +.. _Azure: https://azure.microsoft.com/en-us/products/storage/blobs/ .. _Amazon SES: https://aws.amazon.com/ses/ .. _Mailgun: https://www.mailgun.com diff --git a/docs/settings.rst b/docs/settings.rst index b8c6d448e..4691adbbd 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -49,6 +49,9 @@ DJANGO_AWS_S3_CUSTOM_DOMAIN AWS_S3_CUSTOM_DOMAIN n/a DJANGO_AWS_S3_MAX_MEMORY_SIZE AWS_S3_MAX_MEMORY_SIZE n/a 100_000_000 DJANGO_GCP_STORAGE_BUCKET_NAME GS_BUCKET_NAME n/a raises error GOOGLE_APPLICATION_CREDENTIALS n/a n/a raises error +DJANGO_AZURE_ACCOUNT_KEY AZURE_ACCOUNT_KEY n/a raises error +DJANGO_AZURE_ACCOUNT_NAME AZURE_ACCOUNT_NAME n/a raises error +DJANGO_AZURE_CONTAINER_NAME AZURE_CONTAINER n/a raises error SENTRY_DSN SENTRY_DSN n/a raises error SENTRY_ENVIRONMENT n/a n/a production SENTRY_TRACES_SAMPLE_RATE n/a n/a 0.0 diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index 2845f012c..c3eef1e43 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -72,11 +72,8 @@ if ( sys.exit(1) if ( - "{{ cookiecutter.cloud_provider }}" == "GCP" - and "{{ cookiecutter.mail_service }}" == "Amazon SES" -) or ( - "{{ cookiecutter.cloud_provider }}" == "None" - and "{{ cookiecutter.mail_service }}" == "Amazon SES" + "{{ cookiecutter.mail_service }}" == "Amazon SES" + and "{{ cookiecutter.cloud_provider }}" != "AWS" ): print( "You should either use AWS or select a different " diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 3a757fcb7..6219f75ef 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -56,6 +56,8 @@ SUPPORTED_COMBINATIONS = [ {"cloud_provider": "AWS", "use_whitenoise": "n"}, {"cloud_provider": "GCP", "use_whitenoise": "y"}, {"cloud_provider": "GCP", "use_whitenoise": "n"}, + {"cloud_provider": "Azure", "use_whitenoise": "y"}, + {"cloud_provider": "Azure", "use_whitenoise": "n"}, {"cloud_provider": "None", "use_whitenoise": "y", "mail_service": "Mailgun"}, {"cloud_provider": "None", "use_whitenoise": "y", "mail_service": "Mailjet"}, {"cloud_provider": "None", "use_whitenoise": "y", "mail_service": "Mandrill"}, @@ -82,7 +84,16 @@ SUPPORTED_COMBINATIONS = [ {"cloud_provider": "GCP", "mail_service": "SendinBlue"}, {"cloud_provider": "GCP", "mail_service": "SparkPost"}, {"cloud_provider": "GCP", "mail_service": "Other SMTP"}, - # Note: cloud_providers GCP and None with mail_service Amazon SES is not supported + {"cloud_provider": "Azure", "mail_service": "Mailgun"}, + {"cloud_provider": "Azure", "mail_service": "Mailjet"}, + {"cloud_provider": "Azure", "mail_service": "Mandrill"}, + {"cloud_provider": "Azure", "mail_service": "Postmark"}, + {"cloud_provider": "Azure", "mail_service": "Sendgrid"}, + {"cloud_provider": "Azure", "mail_service": "SendinBlue"}, + {"cloud_provider": "Azure", "mail_service": "SparkPost"}, + {"cloud_provider": "Azure", "mail_service": "Other SMTP"}, + # Note: cloud_providers GCP, Azure, and None + # with mail_service Amazon SES is not supported {"use_async": "y"}, {"use_async": "n"}, {"use_drf": "y"}, @@ -113,6 +124,7 @@ SUPPORTED_COMBINATIONS = [ UNSUPPORTED_COMBINATIONS = [ {"cloud_provider": "None", "use_whitenoise": "n"}, {"cloud_provider": "GCP", "mail_service": "Amazon SES"}, + {"cloud_provider": "Azure", "mail_service": "Amazon SES"}, {"cloud_provider": "None", "mail_service": "Amazon SES"}, ] diff --git a/{{cookiecutter.project_slug}}/.envs/.production/.django b/{{cookiecutter.project_slug}}/.envs/.production/.django index e7e8461c9..ad652c9ad 100644 --- a/{{cookiecutter.project_slug}}/.envs/.production/.django +++ b/{{cookiecutter.project_slug}}/.envs/.production/.django @@ -44,6 +44,12 @@ DJANGO_AWS_STORAGE_BUCKET_NAME= # ------------------------------------------------------------------------------ GOOGLE_APPLICATION_CREDENTIALS= DJANGO_GCP_STORAGE_BUCKET_NAME= +{% elif cookiecutter.cloud_provider == 'Azure' %} +# Azure +# ------------------------------------------------------------------------------ +DJANGO_AZURE_ACCOUNT_KEY= +DJANGO_AZURE_ACCOUNT_NAME= +DJANGO_AZURE_CONTAINER_NAME= {% endif %} # django-allauth # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 8eed5a805..40d3f19cc 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -100,6 +100,10 @@ aws_s3_domain = AWS_S3_CUSTOM_DOMAIN or f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws {% elif cookiecutter.cloud_provider == 'GCP' %} GS_BUCKET_NAME = env("DJANGO_GCP_STORAGE_BUCKET_NAME") GS_DEFAULT_ACL = "publicRead" +{% elif cookiecutter.cloud_provider == 'Azure' %} +AZURE_ACCOUNT_KEY = env("DJANGO_AZURE_ACCOUNT_KEY") +AZURE_ACCOUNT_NAME = env("DJANGO_AZURE_ACCOUNT_NAME") +AZURE_CONTAINER = env("DJANGO_AZURE_CONTAINER_NAME") {% endif -%} {% if cookiecutter.cloud_provider != 'None' or cookiecutter.use_whitenoise == 'y' -%} @@ -116,6 +120,9 @@ STATIC_URL = f"https://{aws_s3_domain}/static/" STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticRootGoogleCloudStorage" COLLECTFAST_STRATEGY = "collectfast.strategies.gcloud.GoogleCloudStrategy" STATIC_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/static/" +{% elif cookiecutter.cloud_provider == 'Azure' -%} +STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticRootAzureStorage" +STATIC_URL = f"https://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/static/" {% endif -%} # MEDIA @@ -126,6 +133,9 @@ MEDIA_URL = f"https://{aws_s3_domain}/media/" {%- elif cookiecutter.cloud_provider == 'GCP' %} DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaRootGoogleCloudStorage" MEDIA_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/media/" +{%- elif cookiecutter.cloud_provider == 'Azure' %} +DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaRootAzureStorage" +MEDIA_URL = f"https://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/media/" {%- endif %} # EMAIL @@ -228,7 +238,7 @@ COMPRESS_ENABLED = env.bool("COMPRESS_ENABLED", default=True) {%- if cookiecutter.cloud_provider == 'None' %} # https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE COMPRESS_STORAGE = "compressor.storage.GzipCompressorFileStorage" -{%- elif cookiecutter.cloud_provider in ('AWS', 'GCP') and cookiecutter.use_whitenoise == 'n' %} +{%- elif cookiecutter.cloud_provider in ('AWS', 'GCP', 'Azure') and cookiecutter.use_whitenoise == 'n' %} # https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE COMPRESS_STORAGE = STATICFILES_STORAGE {%- endif %} diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 275633dd4..c9b5b88a7 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -20,6 +20,8 @@ hiredis==2.0.0 # https://github.com/redis/hiredis-py django-storages[boto3]==1.13.1 # https://github.com/jschneier/django-storages {%- elif cookiecutter.cloud_provider == 'GCP' %} django-storages[google]==1.13.1 # https://github.com/jschneier/django-storages +{%- elif cookiecutter.cloud_provider == 'Azure' %} +django-storages[azure]==1.13.1 # https://github.com/jschneier/django-storages {%- endif %} {%- if cookiecutter.mail_service == 'Mailgun' %} django-anymail[mailgun]==8.6 # https://github.com/anymail/django-anymail diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/storages.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/storages.py index b712d3239..27595ad1a 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/storages.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/storages.py @@ -22,4 +22,15 @@ class StaticRootGoogleCloudStorage(GoogleCloudStorage): class MediaRootGoogleCloudStorage(GoogleCloudStorage): location = "media" file_overwrite = False +{%- elif cookiecutter.cloud_provider == 'Azure' -%} +from storages.backends.azure_storage import AzureStorage + + +class StaticRootAzureStorage(AzureStorage): + location = "static" + + +class MediaRootAzureStorage(AzureStorage): + location = "media" + file_overwrite = False {%- endif %} From 9f8e25ebbc4c6ed1b09c07fe6c36a5b5e8bb2530 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 30 Nov 2022 18:27:34 +0000 Subject: [PATCH 0028/1166] 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 3d4ec0488..49ebfe4d8 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1317,5 +1317,10 @@ "name": "David", "github_login": "buckldav", "twitter_username": "" + }, + { + "name": "rguptar", + "github_login": "rguptar", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 028ed7231..d97324708 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1545,6 +1545,13 @@ Listed in alphabetical order. + + rguptar + + rguptar + + + Richard Hajdu From 431dfc94e2dd70941757221aceb4000ca2c9c022 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 1 Dec 2022 02:37:11 +0000 Subject: [PATCH 0029/1166] Release 2022.11.30 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba72b2cf3..45e784f8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.11.30 + +### Changed +- Add Azure Storage as an option to serve static and media files ([#3967](https://github.com/cookiecutter/cookiecutter-django/pull/3967)) +### Updated +- Auto-update pre-commit hooks ([#3970](https://github.com/cookiecutter/cookiecutter-django/pull/3970)) + ## 2022.11.26 ### Changed diff --git a/setup.py b/setup.py index 6f2fde261..a388c0b61 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.11.26" +version = "2022.11.30" with open("README.rst") as readme_file: long_description = readme_file.read() From a464856234fd9f8f68d17d72fe01f35868179790 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 2 Dec 2022 05:43:02 -0500 Subject: [PATCH 0030/1166] Update flake8 to 6.0.0 (#3974) --- 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 88c8176f1..684ec91e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ binaryornot==0.4.4 # ------------------------------------------------------------------------------ black==22.10.0 isort==5.10.1 -flake8==5.0.4 +flake8==6.0.0 flake8-isort==5.0.3 pre-commit==2.20.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index e7674ce93..a55b1019a 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -28,7 +28,7 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ -flake8==5.0.4 # https://github.com/PyCQA/flake8 +flake8==6.0.0 # https://github.com/PyCQA/flake8 flake8-isort==5.0.3 # https://github.com/gforcada/flake8-isort coverage==6.5.0 # https://github.com/nedbat/coveragepy black==22.10.0 # https://github.com/psf/black From 8ad762cbc654219824cc596b1eb456452b7b1b39 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 3 Dec 2022 02:21:12 +0000 Subject: [PATCH 0031/1166] Release 2022.12.02 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45e784f8b..7a78b7cf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.02 + +### Updated +- Update flake8 to 6.0.0 ([#3974](https://github.com/cookiecutter/cookiecutter-django/pull/3974)) + ## 2022.11.30 ### Changed diff --git a/setup.py b/setup.py index a388c0b61..0fa4ba7ca 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.11.30" +version = "2022.12.02" with open("README.rst") as readme_file: long_description = readme_file.read() From 600783c89bd2fbb0cc459d103ca42bd8c791fb78 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 3 Dec 2022 11:36:29 +0000 Subject: [PATCH 0032/1166] Auto-update pre-commit hooks (#3975) 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 75d2409cd..e8d055772 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - repo: https://github.com/asottile/pyupgrade - rev: v3.2.3 + rev: v3.3.0 hooks: - id: pyupgrade args: [--py310-plus] diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index e8e69627d..516323b42 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-yaml - repo: https://github.com/asottile/pyupgrade - rev: v3.2.3 + rev: v3.3.0 hooks: - id: pyupgrade args: [--py310-plus] From 3deb4d90f2e5884f183b1270b416f7f41cd3f5b1 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 3 Dec 2022 19:12:25 -0500 Subject: [PATCH 0033/1166] Update django-debug-toolbar to 3.8.1 (#3976) --- {{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 a55b1019a..ba8db0339 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -42,7 +42,7 @@ pre-commit==2.20.0 # https://github.com/pre-commit/pre-commit # ------------------------------------------------------------------------------ factory-boy==3.2.1 # https://github.com/FactoryBoy/factory_boy -django-debug-toolbar==3.7.0 # https://github.com/jazzband/django-debug-toolbar +django-debug-toolbar==3.8.1 # https://github.com/jazzband/django-debug-toolbar django-extensions==3.2.1 # https://github.com/django-extensions/django-extensions django-coverage-plugin==2.0.4 # https://github.com/nedbat/django_coverage_plugin pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django From b5ccdf104174edfc3ff7f55b98a2fc5ee3c093ff Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 4 Dec 2022 02:27:06 +0000 Subject: [PATCH 0034/1166] Release 2022.12.03 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a78b7cf4..dd8a4e0d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.03 + +### Updated +- Auto-update pre-commit hooks ([#3975](https://github.com/cookiecutter/cookiecutter-django/pull/3975)) + ## 2022.12.02 ### Updated diff --git a/setup.py b/setup.py index 0fa4ba7ca..6d0fccd46 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.02" +version = "2022.12.03" with open("README.rst") as readme_file: long_description = readme_file.read() From 0336f08da1709b503043e902237d8e5caa12ee96 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 4 Dec 2022 09:10:58 -0500 Subject: [PATCH 0035/1166] Update redis to 4.4.0 (#3977) --- {{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 0817c4262..827530be9 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.2.0 # https://github.com/evansd/whitenoise {%- endif %} -redis==4.3.5 # https://github.com/redis/redis-py +redis==4.4.0 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==2.0.0 # https://github.com/redis/hiredis-py {%- endif %} From 82e0c275f846c3996d66251dab49007d46b47945 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 5 Dec 2022 02:26:01 +0000 Subject: [PATCH 0036/1166] Release 2022.12.04 --- CHANGELOG.md | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd8a4e0d1..b0e1e6690 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.04 + +### Updated +- Update redis to 4.4.0 ([#3977](https://github.com/cookiecutter/cookiecutter-django/pull/3977)) +- Update django-debug-toolbar to 3.8.1 ([#3976](https://github.com/cookiecutter/cookiecutter-django/pull/3976)) + ## 2022.12.03 ### Updated diff --git a/setup.py b/setup.py index 6d0fccd46..e187601c3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.03" +version = "2022.12.04" with open("README.rst") as readme_file: long_description = readme_file.read() From b2deb65c0dedc336e2e7259026cb5b36478e4590 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 09:41:28 +0000 Subject: [PATCH 0037/1166] Bump stefanzweifel/git-auto-commit-action from 4.15.4 to 4.16.0 (#3978) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/update-contributors.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml index 571bdcd02..952486c1b 100644 --- a/.github/workflows/update-contributors.yml +++ b/.github/workflows/update-contributors.yml @@ -31,7 +31,7 @@ jobs: run: python scripts/update_contributors.py - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4.15.4 + uses: stefanzweifel/git-auto-commit-action@v4.16.0 with: commit_message: Update Contributors file_pattern: CONTRIBUTORS.md .github/contributors.json From d272d9752d0c8a6ba8d0c189549355a9a1e3d2dc Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 6 Dec 2022 06:37:50 -0500 Subject: [PATCH 0038/1166] Update django-coverage-plugin to 3.0.0 (#3979) --- {{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 ba8db0339..6082a72c8 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -44,5 +44,5 @@ factory-boy==3.2.1 # https://github.com/FactoryBoy/factory_boy django-debug-toolbar==3.8.1 # https://github.com/jazzband/django-debug-toolbar django-extensions==3.2.1 # https://github.com/django-extensions/django-extensions -django-coverage-plugin==2.0.4 # https://github.com/nedbat/django_coverage_plugin +django-coverage-plugin==3.0.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django From 33af8e3988067811f48f73f8a589002b136aad1a Mon Sep 17 00:00:00 2001 From: Adin Hodovic Date: Tue, 6 Dec 2022 20:04:38 +0100 Subject: [PATCH 0039/1166] Simplify production `DATABASES` setting to extend base definition (#3969) --- {{cookiecutter.project_slug}}/config/settings/production.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 40d3f19cc..15d3a7683 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -22,8 +22,6 @@ ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["{{ cookiecutter.domai # DATABASES # ------------------------------------------------------------------------------ -DATABASES["default"] = env.db("DATABASE_URL") # noqa F405 -DATABASES["default"]["ATOMIC_REQUESTS"] = True # noqa F405 DATABASES["default"]["CONN_MAX_AGE"] = env.int("CONN_MAX_AGE", default=60) # noqa F405 # CACHES From fc081ce1fef82d71e1f8e948821623354884b147 Mon Sep 17 00:00:00 2001 From: ghazi-git Date: Tue, 6 Dec 2022 14:26:24 -0500 Subject: [PATCH 0040/1166] set SERVERS in production settings instead of base settings (#3609) fixes https://github.com/cookiecutter/cookiecutter-django/issues/3593 --- {{cookiecutter.project_slug}}/config/settings/base.py | 4 ---- .../config/settings/production.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 52798146e..1989fd8cb 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -350,10 +350,6 @@ SPECTACULAR_SETTINGS = { "DESCRIPTION": "Documentation of API endpoints of {{ cookiecutter.project_name }}", "VERSION": "1.0.0", "SERVE_PERMISSIONS": ["rest_framework.permissions.IsAdminUser"], - "SERVERS": [ - {"url": "http://127.0.0.1:8000", "description": "Local Development server"}, - {"url": "https://{{ cookiecutter.domain_name }}", "description": "Production server"}, - ], } {%- endif %} # Your stuff... diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 15d3a7683..5de0529e2 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -368,5 +368,15 @@ sentry_sdk.init( traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=0.0), ) {% endif %} +{% if cookiecutter.use_drf == "y" -%} + +# django-rest-framework +# ------------------------------------------------------------------------------- +# Tools that generate code samples can use SERVERS to point to the correct domain +SPECTACULAR_SETTINGS["SERVERS"] = [ # noqa F405 + {"url": "https://{{ cookiecutter.domain_name }}", "description": "Production server"} +] + +{%- endif %} # Your stuff... # ------------------------------------------------------------------------------ From eff4969a39876d8d30dd5232a911f4c8e9fc3ec5 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 7 Dec 2022 02:50:13 +0000 Subject: [PATCH 0041/1166] Release 2022.12.06 --- CHANGELOG.md | 10 ++++++++++ setup.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0e1e6690..5654520ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.06 + +### Changed +- Simplify production `DATABASES` setting to extend base definition ([#3969](https://github.com/cookiecutter/cookiecutter-django/pull/3969)) +### Fixed +- Only set `SERVERS` for `drf-spectacular` in production ([#3609](https://github.com/cookiecutter/cookiecutter-django/pull/3609)) +### Updated +- Update django-coverage-plugin to 3.0.0 ([#3979](https://github.com/cookiecutter/cookiecutter-django/pull/3979)) +- Bump stefanzweifel/git-auto-commit-action from 4.15.4 to 4.16.0 ([#3978](https://github.com/cookiecutter/cookiecutter-django/pull/3978)) + ## 2022.12.04 ### Updated diff --git a/setup.py b/setup.py index e187601c3..b7bc61890 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.04" +version = "2022.12.06" with open("README.rst") as readme_file: long_description = readme_file.read() From 57496c56c57659bde9d9523d532f96ee9d79fc28 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 7 Dec 2022 07:48:50 +0000 Subject: [PATCH 0042/1166] Auto-update pre-commit hooks (#3983) 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 e8d055772..5669b756e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - repo: https://github.com/asottile/pyupgrade - rev: v3.3.0 + rev: v3.3.1 hooks: - id: pyupgrade args: [--py310-plus] diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 516323b42..1b0150c4a 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-yaml - repo: https://github.com/asottile/pyupgrade - rev: v3.3.0 + rev: v3.3.1 hooks: - id: pyupgrade args: [--py310-plus] From aa318af1fc3cf9a74af6edfcaaaddd9e64ec4be2 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 8 Dec 2022 02:45:51 +0000 Subject: [PATCH 0043/1166] Release 2022.12.07 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5654520ff..415ccd23f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.07 + +### Updated +- Auto-update pre-commit hooks ([#3983](https://github.com/cookiecutter/cookiecutter-django/pull/3983)) + ## 2022.12.06 ### Changed diff --git a/setup.py b/setup.py index b7bc61890..151b1e356 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.06" +version = "2022.12.07" with open("README.rst") as readme_file: long_description = readme_file.read() From d15465a5821d2565467f5a390007285dd967732b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 8 Dec 2022 08:16:33 -0500 Subject: [PATCH 0044/1166] Update django-stubs to 1.13.1 (#3986) --- {{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 6082a72c8..bacfdbbe5 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==0.982 # https://github.com/python/mypy -django-stubs==1.12.0 # https://github.com/typeddjango/django-stubs +django-stubs==1.13.1 # https://github.com/typeddjango/django-stubs pytest==7.2.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} From 585620eca732aad7bd0e67a1cba025b58003f823 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 8 Dec 2022 08:17:00 -0500 Subject: [PATCH 0045/1166] Update tox to 4.0.2 (#3985) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 684ec91e0..f428f623b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.20.0 # Testing # ------------------------------------------------------------------------------ -tox==3.27.1 +tox==4.0.2 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From b2d6ddbc480d791eb8bdd1bc9cf86b27759badb7 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 8 Dec 2022 17:07:18 -0500 Subject: [PATCH 0046/1166] Update tox from 4.0.2 to 4.0.3 (#3987) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f428f623b..c35de3b6d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.20.0 # Testing # ------------------------------------------------------------------------------ -tox==4.0.2 +tox==4.0.3 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From c2602032c8203d5e71fb71bc111e04b86a242af0 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 9 Dec 2022 02:45:59 +0000 Subject: [PATCH 0047/1166] Release 2022.12.08 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 415ccd23f..132fd96fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.08 + +### Updated +- Update tox to 4.0.3 ([#3987](https://github.com/cookiecutter/cookiecutter-django/pull/3987)) +- Update tox to 4.0.2 ([#3985](https://github.com/cookiecutter/cookiecutter-django/pull/3985)) +- Update django-stubs to 1.13.1 ([#3986](https://github.com/cookiecutter/cookiecutter-django/pull/3986)) + ## 2022.12.07 ### Updated diff --git a/setup.py b/setup.py index 151b1e356..558ea522a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.07" +version = "2022.12.08" with open("README.rst") as readme_file: long_description = readme_file.read() From 2f92644fce097a64a4a47205e24d4ac653cb199c Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 9 Dec 2022 22:04:12 +0000 Subject: [PATCH 0048/1166] Remove bind mounts for docker compose volumes (#3981) Fix #3685 --- {{cookiecutter.project_slug}}/local.yml | 4 ++-- {{cookiecutter.project_slug}}/production.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.project_slug}}/local.yml b/{{cookiecutter.project_slug}}/local.yml index 33a8db07a..38b9d77d3 100644 --- a/{{cookiecutter.project_slug}}/local.yml +++ b/{{cookiecutter.project_slug}}/local.yml @@ -35,8 +35,8 @@ services: image: {{ cookiecutter.project_slug }}_production_postgres container_name: {{ cookiecutter.project_slug }}_local_postgres volumes: - - {{ cookiecutter.project_slug }}_local_postgres_data:/var/lib/postgresql/data:Z - - {{ cookiecutter.project_slug }}_local_postgres_data_backups:/backups:z + - {{ cookiecutter.project_slug }}_local_postgres_data:/var/lib/postgresql/data + - {{ cookiecutter.project_slug }}_local_postgres_data_backups:/backups env_file: - ./.envs/.local/.postgres diff --git a/{{cookiecutter.project_slug}}/production.yml b/{{cookiecutter.project_slug}}/production.yml index ea4292a0d..cc4c9bca1 100644 --- a/{{cookiecutter.project_slug}}/production.yml +++ b/{{cookiecutter.project_slug}}/production.yml @@ -25,8 +25,8 @@ services: dockerfile: ./compose/production/postgres/Dockerfile image: {{ cookiecutter.project_slug }}_production_postgres volumes: - - production_postgres_data:/var/lib/postgresql/data:Z - - production_postgres_data_backups:/backups:z + - production_postgres_data:/var/lib/postgresql/data + - production_postgres_data_backups:/backups env_file: - ./.envs/.production/.postgres @@ -38,7 +38,7 @@ services: depends_on: - django volumes: - - production_traefik:/etc/traefik/acme:z + - production_traefik:/etc/traefik/acme ports: - "0.0.0.0:80:80" - "0.0.0.0:443:443" From a9c3b56e5f6de3c9d216847e3bd404c80ae67c63 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 9 Dec 2022 17:04:36 -0500 Subject: [PATCH 0049/1166] Update black to 22.12.0 (#3988) * Update black from 22.10.0 to 22.12.0 * Update black from 22.10.0 to 22.12.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 c35de3b6d..0aedb48e8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ -black==22.10.0 +black==22.12.0 isort==5.10.1 flake8==6.0.0 flake8-isort==5.0.3 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index bacfdbbe5..e02ea203e 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==5.0.3 # https://github.com/gforcada/flake8-isort coverage==6.5.0 # https://github.com/nedbat/coveragepy -black==22.10.0 # https://github.com/psf/black +black==22.12.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 20b7ca105bbdc21d21c267427c5974515b6cba5e Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 9 Dec 2022 17:18:10 -0500 Subject: [PATCH 0050/1166] Update djangorestframework-stubs to 1.8.0 (#3990) --- {{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 e02ea203e..6b073194c 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -18,7 +18,7 @@ django-stubs==1.13.1 # https://github.com/typeddjango/django-stubs pytest==7.2.0 # 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.7.0 # https://github.com/typeddjango/djangorestframework-stubs +djangorestframework-stubs==1.8.0 # https://github.com/typeddjango/djangorestframework-stubs {%- endif %} # Documentation From db048af2d34dea0b2c92d962f88453be458ede7d Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 10 Dec 2022 02:24:07 +0000 Subject: [PATCH 0051/1166] Release 2022.12.09 --- CHANGELOG.md | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 132fd96fb..8ae474316 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.09 + +### Changed +- Remove bind option mounts for docker compose volumes ([#3981](https://github.com/cookiecutter/cookiecutter-django/pull/3981)) +### Updated +- Update djangorestframework-stubs to 1.8.0 ([#3990](https://github.com/cookiecutter/cookiecutter-django/pull/3990)) +- Update black to 22.12.0 ([#3988](https://github.com/cookiecutter/cookiecutter-django/pull/3988)) + ## 2022.12.08 ### Updated diff --git a/setup.py b/setup.py index 558ea522a..42af5a0dc 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.08" +version = "2022.12.09" with open("README.rst") as readme_file: long_description = readme_file.read() From 8b9c719a31039e200526087c0b43e289a47619dd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 10 Dec 2022 15:13:10 +0000 Subject: [PATCH 0052/1166] Auto-update pre-commit hooks (#3991) 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 5669b756e..b256f5bff 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: 22.10.0 + rev: 22.12.0 hooks: - id: black diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 1b0150c4a..18301b233 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: 22.10.0 + rev: 22.12.0 hooks: - id: black From 8f84d146e35ba4feb131c9786cb2a5abde5fb35a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 10 Dec 2022 10:13:41 -0500 Subject: [PATCH 0053/1166] Update tox from 4.0.3 to 4.0.5 (#3993) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0aedb48e8..0ec11e7b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.20.0 # Testing # ------------------------------------------------------------------------------ -tox==4.0.3 +tox==4.0.5 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From 026165d52ea779d507856564bd87971dd1de7301 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 11 Dec 2022 02:30:45 +0000 Subject: [PATCH 0054/1166] Release 2022.12.10 --- CHANGELOG.md | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ae474316..74ed1e650 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.10 + +### Updated +- Update tox to 4.0.5 ([#3993](https://github.com/cookiecutter/cookiecutter-django/pull/3993)) +- Auto-update pre-commit hooks ([#3991](https://github.com/cookiecutter/cookiecutter-django/pull/3991)) + ## 2022.12.09 ### Changed diff --git a/setup.py b/setup.py index 42af5a0dc..15ed7ce23 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.09" +version = "2022.12.10" with open("README.rst") as readme_file: long_description = readme_file.read() From 5ccf73843afd7f0af383f30f4c1f55a6605b673a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 13 Dec 2022 04:05:57 -0500 Subject: [PATCH 0055/1166] Update isort from 5.10.1 to 5.11.0 (#3997) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0ec11e7b5..7f53de8ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ black==22.12.0 -isort==5.10.1 +isort==5.11.0 flake8==6.0.0 flake8-isort==5.0.3 pre-commit==2.20.0 From 2cadf20adf25173acf8e2e95137f69953b5f4410 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 13 Dec 2022 09:06:12 +0000 Subject: [PATCH 0056/1166] Auto-update pre-commit hooks (#3998) 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 b256f5bff..fedfdc47f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.11.1 hooks: - id: isort diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 18301b233..f0231004c 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.11.1 hooks: - id: isort From a04558a7d5ad31e26edd0111c20b23d48b62899a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 13 Dec 2022 04:48:21 -0500 Subject: [PATCH 0057/1166] Update isort from 5.11.0 to 5.11.1 (#3999) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7f53de8ca..62d71b3b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ black==22.12.0 -isort==5.11.0 +isort==5.11.1 flake8==6.0.0 flake8-isort==5.0.3 pre-commit==2.20.0 From ed90ead15f56493723e1fc0590c9bdb0bdccea01 Mon Sep 17 00:00:00 2001 From: Omer-5 <61422607+Omer-5@users.noreply.github.com> Date: Tue, 13 Dec 2022 23:32:57 +0200 Subject: [PATCH 0058/1166] Improve documentation for Getting started with Docker (#4003) Fix https://github.com/cookiecutter/cookiecutter-django/issues/3971 --- docs/developing-locally-docker.rst | 9 ++++++--- docs/developing-locally.rst | 6 +++--- docs/generate-project-block.rst | 7 +++++++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 docs/generate-project-block.rst diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 4bb5d9032..a7d77e108 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -3,9 +3,6 @@ Getting Up and Running Locally With Docker .. index:: Docker -The steps below will get you up and running with a local development environment. -All of these commands assume you are in the root of your generated project. - .. note:: If you're new to Docker, please be aware that some resources are cached system-wide @@ -19,10 +16,16 @@ Prerequisites * Docker; if you don't have it yet, follow the `installation instructions`_; * Docker Compose; refer to the official documentation for the `installation guide`_. * Pre-commit; refer to the official documentation for the `pre-commit`_. +* Cookiecutter; refer to the official GitHub repository of `Cookiecutter`_ .. _`installation instructions`: https://docs.docker.com/install/#supported-platforms .. _`installation guide`: https://docs.docker.com/compose/install/ .. _`pre-commit`: https://pre-commit.com/#install +.. _`Cookiecutter`: https://github.com/cookiecutter/cookiecutter + +Before Getting Started +---------------------- +.. include:: generate-project-block.rst Build the Stack --------------- diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index c9d28ff73..e1c946268 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -24,9 +24,8 @@ First things first. $ source /bin/activate -#. Install cookiecutter-django: :: - - $ cookiecutter gh:cookiecutter/cookiecutter-django +#. + .. include:: generate-project-block.rst #. Install development requirements: :: @@ -43,6 +42,7 @@ First things first. #. Create a new PostgreSQL database using createdb_: :: $ createdb --username=postgres + ``project_slug`` is what you have entered as the project_slug at the setup stage. .. note:: diff --git a/docs/generate-project-block.rst b/docs/generate-project-block.rst new file mode 100644 index 000000000..2842b551d --- /dev/null +++ b/docs/generate-project-block.rst @@ -0,0 +1,7 @@ +Generate a new cookiecutter-django project: :: + + $ cookiecutter gh:cookiecutter/cookiecutter-django + +For more information refer to +:ref:`Project Generation Options `. + From bf9346eda57fb1ca238b7bb2569de6ec64ed6f40 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 13 Dec 2022 21:35:25 +0000 Subject: [PATCH 0059/1166] Fix update contributors workflow --- .github/workflows/update-contributors.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml index 952486c1b..83c651a46 100644 --- a/.github/workflows/update-contributors.yml +++ b/.github/workflows/update-contributors.yml @@ -29,6 +29,8 @@ jobs: pip install -r requirements.txt - name: Update list run: python scripts/update_contributors.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v4.16.0 From 7af6f69b2899d30cc977aa69838fdce64f835093 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 13 Dec 2022 21:35:58 +0000 Subject: [PATCH 0060/1166] 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 49ebfe4d8..68f1b4c2d 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1322,5 +1322,10 @@ "name": "rguptar", "github_login": "rguptar", "twitter_username": "" + }, + { + "name": "Omer-5", + "github_login": "Omer-5", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d97324708..d8a9d8190 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1447,6 +1447,13 @@ Listed in alphabetical order. + + Omer-5 + + Omer-5 + + + Pablo From 882f5052891c1a414386172ba1063eb309e512be Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 14 Dec 2022 02:29:57 +0000 Subject: [PATCH 0061/1166] Release 2022.12.13 --- CHANGELOG.md | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74ed1e650..5ee4a4757 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.13 + +### Changed +- Improve documentation for Getting started with Docker ([#4003](https://github.com/cookiecutter/cookiecutter-django/pull/4003)) +### Updated +- Update isort to 5.11.1 ([#3999](https://github.com/cookiecutter/cookiecutter-django/pull/3999)) +- Auto-update pre-commit hooks ([#3998](https://github.com/cookiecutter/cookiecutter-django/pull/3998)) +- Update isort to 5.11.0 ([#3997](https://github.com/cookiecutter/cookiecutter-django/pull/3997)) + ## 2022.12.10 ### Updated diff --git a/setup.py b/setup.py index 15ed7ce23..680a75c09 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.10" +version = "2022.12.13" with open("README.rst") as readme_file: long_description = readme_file.read() From d3bd184aaaf326a172e719a238f9ebe14cfb3184 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Wed, 21 Dec 2022 18:47:51 +0900 Subject: [PATCH 0062/1166] Update image URL for build status shield badge (#4018) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 27fc6e0e1..eaac817a3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cookiecutter Django -[![Build Status](https://img.shields.io/github/workflow/status/cookiecutter/cookiecutter-django/CI/master)](https://github.com/cookiecutter/cookiecutter-django/actions?query=workflow%3ACI) +[![Build Status](https://img.shields.io/github/actions/workflow/status/cookiecutter/cookiecutter-django/ci.yml?branch=master)](https://github.com/cookiecutter/cookiecutter-django/actions?query=workflow%3ACI) [![Documentation Status](https://readthedocs.org/projects/cookiecutter-django/badge/?version=latest)](https://cookiecutter-django.readthedocs.io/en/latest/?badge=latest) [![Updates](https://pyup.io/repos/github/cookiecutter/cookiecutter-django/shield.svg)](https://pyup.io/repos/github/cookiecutter/cookiecutter-django/) [![Join our Discord](https://img.shields.io/badge/Discord-cookiecutter-5865F2?style=flat&logo=discord&logoColor=white)](https://discord.gg/uFXweDQc5a) From ebec4dc44db9dfd43d2cdcddb2d3aaf4d8e8ebe7 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 21 Dec 2022 09:48:24 +0000 Subject: [PATCH 0063/1166] 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 68f1b4c2d..5c8b1f753 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1327,5 +1327,10 @@ "name": "Omer-5", "github_login": "Omer-5", "twitter_username": "" + }, + { + "name": "TAKAHASHI Shuuji", + "github_login": "shuuji3", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d8a9d8190..dba721de6 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1671,6 +1671,13 @@ Listed in alphabetical order. + + TAKAHASHI Shuuji + + shuuji3 + + + Tames McTigue From 9b9bc9bec175490f8ed0016ca938fca5e08c5167 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 21 Dec 2022 09:49:45 +0000 Subject: [PATCH 0064/1166] Update target URL for build badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eaac817a3..38724caff 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cookiecutter Django -[![Build Status](https://img.shields.io/github/actions/workflow/status/cookiecutter/cookiecutter-django/ci.yml?branch=master)](https://github.com/cookiecutter/cookiecutter-django/actions?query=workflow%3ACI) +[![Build Status](https://img.shields.io/github/actions/workflow/status/cookiecutter/cookiecutter-django/ci.yml?branch=master)]([https://github.com/cookiecutter/cookiecutter-django/actions?query=workflow%3ACI](https://github.com/cookiecutter/cookiecutter-django/actions/workflows/ci.yml?query=workflow%3ACI+branch%3Amaster)) [![Documentation Status](https://readthedocs.org/projects/cookiecutter-django/badge/?version=latest)](https://cookiecutter-django.readthedocs.io/en/latest/?badge=latest) [![Updates](https://pyup.io/repos/github/cookiecutter/cookiecutter-django/shield.svg)](https://pyup.io/repos/github/cookiecutter/cookiecutter-django/) [![Join our Discord](https://img.shields.io/badge/Discord-cookiecutter-5865F2?style=flat&logo=discord&logoColor=white)](https://discord.gg/uFXweDQc5a) From 2c914c203220206d028b88208cf4a7a8a4d002e3 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 21 Dec 2022 09:51:17 +0000 Subject: [PATCH 0065/1166] Fix URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38724caff..d8fc58ec4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cookiecutter Django -[![Build Status](https://img.shields.io/github/actions/workflow/status/cookiecutter/cookiecutter-django/ci.yml?branch=master)]([https://github.com/cookiecutter/cookiecutter-django/actions?query=workflow%3ACI](https://github.com/cookiecutter/cookiecutter-django/actions/workflows/ci.yml?query=workflow%3ACI+branch%3Amaster)) +[![Build Status](https://img.shields.io/github/actions/workflow/status/cookiecutter/cookiecutter-django/ci.yml?branch=master)](https://github.com/cookiecutter/cookiecutter-django/actions/workflows/ci.yml?query=branch%3Amaster) [![Documentation Status](https://readthedocs.org/projects/cookiecutter-django/badge/?version=latest)](https://cookiecutter-django.readthedocs.io/en/latest/?badge=latest) [![Updates](https://pyup.io/repos/github/cookiecutter/cookiecutter-django/shield.svg)](https://pyup.io/repos/github/cookiecutter/cookiecutter-django/) [![Join our Discord](https://img.shields.io/badge/Discord-cookiecutter-5865F2?style=flat&logo=discord&logoColor=white)](https://discord.gg/uFXweDQc5a) From 7a6435695b82c86e6895862f5d2c0c0b5a0a57f6 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Dec 2022 04:52:05 -0500 Subject: [PATCH 0066/1166] Update hiredis to 2.1.0 (#4006) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 827530be9..6aa2b6558 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -14,7 +14,7 @@ whitenoise==6.2.0 # https://github.com/evansd/whitenoise {%- endif %} redis==4.4.0 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} -hiredis==2.0.0 # https://github.com/redis/hiredis-py +hiredis==2.1.0 # https://github.com/redis/hiredis-py {%- endif %} {%- if cookiecutter.use_celery == "y" %} celery==5.2.7 # pyup: < 6.0 # https://github.com/celery/celery diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index c9b5b88a7..1d199b125 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -11,7 +11,7 @@ Collectfast==2.2.0 # https://github.com/antonagestam/collectfast sentry-sdk==1.11.1 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} -hiredis==2.0.0 # https://github.com/redis/hiredis-py +hiredis==2.1.0 # https://github.com/redis/hiredis-py {%- endif %} # Django From 256a967087e7a1bc945be18be43cc36adfc65522 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Dec 2022 06:02:04 -0500 Subject: [PATCH 0067/1166] Update drf-spectacular to 0.25.1 (#4009) --- {{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 6aa2b6558..e5aafcd73 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -44,5 +44,5 @@ 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.13.0 # https://github.com/adamchainz/django-cors-headers # DRF-spectacular for api documentation -drf-spectacular==0.24.2 # https://github.com/tfranzel/drf-spectacular +drf-spectacular==0.25.1 # https://github.com/tfranzel/drf-spectacular {%- endif %} From d26fc164e7e384c6d1532c815d7d21467f8f972c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Dec 2022 06:16:43 -0500 Subject: [PATCH 0068/1166] Update isort to 5.11.3 (#4010) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 62d71b3b4..1a1688a6b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ black==22.12.0 -isort==5.11.1 +isort==5.11.3 flake8==6.0.0 flake8-isort==5.0.3 pre-commit==2.20.0 From e101fbc5215dbe7f5571e308c043b480d8867bc0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 21 Dec 2022 11:20:19 +0000 Subject: [PATCH 0069/1166] Auto-update pre-commit hooks (#4005) 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 fedfdc47f..6400b593e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.11.1 + rev: v5.11.3 hooks: - id: isort diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index f0231004c..8cec23181 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.11.1 + rev: v5.11.3 hooks: - id: isort From 81309a610fcf8901a736689740b3f67cbecc2cab Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Dec 2022 06:20:42 -0500 Subject: [PATCH 0070/1166] Update django-anymail to 9.0 (#4012) --- .../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 1d199b125..adb7dbcdf 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -24,21 +24,21 @@ django-storages[google]==1.13.1 # https://github.com/jschneier/django-storages django-storages[azure]==1.13.1 # https://github.com/jschneier/django-storages {%- endif %} {%- if cookiecutter.mail_service == 'Mailgun' %} -django-anymail[mailgun]==8.6 # https://github.com/anymail/django-anymail +django-anymail[mailgun]==9.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Amazon SES' %} -django-anymail[amazon_ses]==8.6 # https://github.com/anymail/django-anymail +django-anymail[amazon_ses]==9.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Mailjet' %} -django-anymail[mailjet]==8.6 # https://github.com/anymail/django-anymail +django-anymail[mailjet]==9.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Mandrill' %} -django-anymail[mandrill]==8.6 # https://github.com/anymail/django-anymail +django-anymail[mandrill]==9.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Postmark' %} -django-anymail[postmark]==8.6 # https://github.com/anymail/django-anymail +django-anymail[postmark]==9.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Sendgrid' %} -django-anymail[sendgrid]==8.6 # https://github.com/anymail/django-anymail +django-anymail[sendgrid]==9.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'SendinBlue' %} -django-anymail[sendinblue]==8.6 # https://github.com/anymail/django-anymail +django-anymail[sendinblue]==9.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'SparkPost' %} -django-anymail[sparkpost]==8.6 # https://github.com/anymail/django-anymail +django-anymail[sparkpost]==9.0 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Other SMTP' %} -django-anymail==8.6 # https://github.com/anymail/django-anymail +django-anymail==9.0 # https://github.com/anymail/django-anymail {%- endif %} From dd1f3a6d12d3e9e1a4b8fb0cb3e9d0046c38f702 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Dec 2022 08:57:20 -0500 Subject: [PATCH 0071/1166] Update coverage to 7.0.0 (#4013) Co-authored-by: Bruno Alla --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- {{cookiecutter.project_slug}}/setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 6b073194c..91994de00 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==5.0.3 # https://github.com/gforcada/flake8-isort -coverage==6.5.0 # https://github.com/nedbat/coveragepy +coverage==7.0.0 # https://github.com/nedbat/coveragepy black==22.12.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} diff --git a/{{cookiecutter.project_slug}}/setup.cfg b/{{cookiecutter.project_slug}}/setup.cfg index 3bec1fbee..b99bba644 100644 --- a/{{cookiecutter.project_slug}}/setup.cfg +++ b/{{cookiecutter.project_slug}}/setup.cfg @@ -34,7 +34,7 @@ django_settings_module = config.settings.test ignore_errors = True [coverage:run] -include = {{cookiecutter.project_slug}}/* +include = {{cookiecutter.project_slug}}/** omit = *migrations*, *tests* plugins = django_coverage_plugin From 31a1de9bfb9f991019b6c541daa20723b887dcdb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Dec 2022 08:58:04 -0500 Subject: [PATCH 0072/1166] Update sentry-sdk to 1.12.1 (#4014) --- {{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 adb7dbcdf..b7d73819b 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.11.1 # https://github.com/getsentry/sentry-python +sentry-sdk==1.12.1 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.1.0 # https://github.com/redis/hiredis-py From 9bc388dd0d323a299cf786b61133d63f437ef80e Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Dec 2022 08:58:53 -0500 Subject: [PATCH 0073/1166] Update tox to 4.0.16 (#4017) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1a1688a6b..3f5b0a6d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.20.0 # Testing # ------------------------------------------------------------------------------ -tox==4.0.5 +tox==4.0.16 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From e869ab7cc40da5bd482d4410b2befd2fac668263 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Dec 2022 09:22:37 -0500 Subject: [PATCH 0074/1166] Update ipdb to 0.13.11 (#4019) --- {{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 91994de00..3732a3f18 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.2 # https://github.com/pallets/werkzeug -ipdb==0.13.9 # https://github.com/gotcha/ipdb +ipdb==0.13.11 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.9.5 # https://github.com/psycopg/psycopg2 {%- else %} From 7fc0b1d16738ad8441833c369d75c6c7f107d0f5 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Dec 2022 09:24:02 -0500 Subject: [PATCH 0075/1166] Update pytz to 2022.7 (#4020) --- {{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 e5aafcd73..9acae6a80 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,4 +1,4 @@ -pytz==2022.6 # https://github.com/stub42/pytz +pytz==2022.7 # https://github.com/stub42/pytz python-slugify==7.0.0 # https://github.com/un33k/python-slugify Pillow==9.3.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} From 93c0769516b7e64e8f5471bbe79f5e3dfa7cdd62 Mon Sep 17 00:00:00 2001 From: Dani Hodovic Date: Wed, 21 Dec 2022 15:39:54 +0100 Subject: [PATCH 0076/1166] Retry when trying to store a Celery result in backend (#3996) Co-authored-by: Bruno Alla --- {{cookiecutter.project_slug}}/config/settings/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 1989fd8cb..6bf6a6e5c 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -283,6 +283,11 @@ CELERY_BROKER_URL = env("CELERY_BROKER_URL") CELERY_RESULT_BACKEND = CELERY_BROKER_URL # https://docs.celeryq.dev/en/stable/userguide/configuration.html#result-extended CELERY_RESULT_EXTENDED = True +# https://docs.celeryq.dev/en/stable/userguide/configuration.html#result-backend-always-retry +# https://github.com/celery/celery/pull/6122 +CELERY_RESULT_BACKEND_ALWAYS_RETRY = True +# https://docs.celeryq.dev/en/stable/userguide/configuration.html#result-backend-max-retries +CELERY_RESULT_BACKEND_MAX_RETRIES = 10 # https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-accept_content CELERY_ACCEPT_CONTENT = ["json"] # https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-task_serializer From be69fadefcba0de477d94d4695e26722bc93992a Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 22 Dec 2022 02:21:52 +0000 Subject: [PATCH 0077/1166] Release 2022.12.21 --- CHANGELOG.md | 17 +++++++++++++++++ setup.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ee4a4757..150b750b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.21 + +### Changed +- Retry when trying to store a Celery result in backend ([#3996](https://github.com/cookiecutter/cookiecutter-django/pull/3996)) +- Update image URL for build status shield badge ([#4018](https://github.com/cookiecutter/cookiecutter-django/pull/4018)) +### Updated +- Update pytz to 2022.7 ([#4020](https://github.com/cookiecutter/cookiecutter-django/pull/4020)) +- Update ipdb to 0.13.11 ([#4019](https://github.com/cookiecutter/cookiecutter-django/pull/4019)) +- Update tox to 4.0.16 ([#4017](https://github.com/cookiecutter/cookiecutter-django/pull/4017)) +- Update sentry-sdk to 1.12.1 ([#4014](https://github.com/cookiecutter/cookiecutter-django/pull/4014)) +- Update coverage to 7.0.0 ([#4013](https://github.com/cookiecutter/cookiecutter-django/pull/4013)) +- Update django-anymail to 9.0 ([#4012](https://github.com/cookiecutter/cookiecutter-django/pull/4012)) +- Auto-update pre-commit hooks ([#4005](https://github.com/cookiecutter/cookiecutter-django/pull/4005)) +- Update isort to 5.11.3 ([#4010](https://github.com/cookiecutter/cookiecutter-django/pull/4010)) +- Update drf-spectacular to 0.25.1 ([#4009](https://github.com/cookiecutter/cookiecutter-django/pull/4009)) +- Update hiredis to 2.1.0 ([#4006](https://github.com/cookiecutter/cookiecutter-django/pull/4006)) + ## 2022.12.13 ### Changed diff --git a/setup.py b/setup.py index 680a75c09..7adacfaee 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.13" +version = "2022.12.21" with open("README.rst") as readme_file: long_description = readme_file.read() From bd2d3edd314a90147dc7280781830b358a1e5616 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 24 Dec 2022 06:25:53 -0500 Subject: [PATCH 0078/1166] Update coverage from 7.0.0 to 7.0.1 (#4024) --- {{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 3732a3f18..adba4a0f7 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==5.0.3 # https://github.com/gforcada/flake8-isort -coverage==7.0.0 # https://github.com/nedbat/coveragepy +coverage==7.0.1 # https://github.com/nedbat/coveragepy black==22.12.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From 5e098901510b845c781bdae3e7f498898b61da9e Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 25 Dec 2022 02:24:44 +0000 Subject: [PATCH 0079/1166] Release 2022.12.24 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 150b750b7..17c7fffbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.24 + +### Updated +- Update coverage to 7.0.1 ([#4024](https://github.com/cookiecutter/cookiecutter-django/pull/4024)) + ## 2022.12.21 ### Changed diff --git a/setup.py b/setup.py index 7adacfaee..5bdf3eeb3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.21" +version = "2022.12.24" with open("README.rst") as readme_file: long_description = readme_file.read() From 5c30b67df1145c4b009981e27c0a21257c26ed50 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 25 Dec 2022 09:33:59 +0000 Subject: [PATCH 0080/1166] Auto-update pre-commit hooks (#4021) 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 6400b593e..ca86e7eb5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: black - repo: https://github.com/PyCQA/isort - rev: v5.11.3 + rev: 5.11.4 hooks: - id: isort diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 8cec23181..c1aaf0d9f 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: black - repo: https://github.com/PyCQA/isort - rev: v5.11.3 + rev: 5.11.4 hooks: - id: isort From 88370e648849e3d4fb68f68b19450f5021bf3af2 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 26 Dec 2022 02:22:40 +0000 Subject: [PATCH 0081/1166] Release 2022.12.25 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17c7fffbc..75cbf2ade 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.25 + +### Updated +- Auto-update pre-commit hooks ([#4021](https://github.com/cookiecutter/cookiecutter-django/pull/4021)) + ## 2022.12.24 ### Updated diff --git a/setup.py b/setup.py index 5bdf3eeb3..e41708a8e 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.24" +version = "2022.12.25" with open("README.rst") as readme_file: long_description = readme_file.read() From 019efba2e1cc44aa1b4aa9627cf49729c3dea24d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 26 Dec 2022 05:03:43 -0500 Subject: [PATCH 0082/1166] Update pre-commit to 2.21.0 (#4026) * Update pre-commit from 2.20.0 to 2.21.0 * Update pre-commit from 2.20.0 to 2.21.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 3f5b0a6d8..27cdeeb11 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ black==22.12.0 isort==5.11.3 flake8==6.0.0 flake8-isort==5.0.3 -pre-commit==2.20.0 +pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index adba4a0f7..22b0f0fa3 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==2.20.0 # https://github.com/pre-commit/pre-commit +pre-commit==2.21.0 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From f1b5056f4a02a29de23a3d20be422fffc2c1fa30 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 26 Dec 2022 05:03:58 -0500 Subject: [PATCH 0083/1166] Update tox from 4.0.16 to 4.0.17 (#4027) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 27cdeeb11..ec14de1c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.0.16 +tox==4.0.17 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From 6b3b5cd067995dd4a199d17c259ae18ed55ec50f Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 27 Dec 2022 02:20:11 +0000 Subject: [PATCH 0084/1166] Release 2022.12.26 --- CHANGELOG.md | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75cbf2ade..9ff6f2286 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.26 + +### Updated +- Update tox to 4.0.17 ([#4027](https://github.com/cookiecutter/cookiecutter-django/pull/4027)) +- Update pre-commit to 2.21.0 ([#4026](https://github.com/cookiecutter/cookiecutter-django/pull/4026)) + ## 2022.12.25 ### Updated diff --git a/setup.py b/setup.py index e41708a8e..e7ec62436 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.25" +version = "2022.12.26" with open("README.rst") as readme_file: long_description = readme_file.read() From c72818063133cd3da8fcb13d0d62a49379c6ed00 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 29 Dec 2022 00:18:41 -0800 Subject: [PATCH 0085/1166] Update gitpython from 3.1.29 to 3.1.30 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ec14de1c6..04852f01c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,6 +21,6 @@ pyyaml==6.0 # Scripting # ------------------------------------------------------------------------------ PyGithub==1.57 -gitpython==3.1.29 +gitpython==3.1.30 jinja2==3.1.2 requests==2.28.1 From 5530eebfec0b7607078bdca6bd2e95cdcafbfe73 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 29 Dec 2022 02:21:49 -0800 Subject: [PATCH 0086/1166] Update django-allauth from 0.51.0 to 0.52.0 --- {{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 9acae6a80..8ae17ad60 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -32,7 +32,7 @@ uvicorn[standard]==0.20.0 # https://github.com/encode/uvicorn django==4.0.8 # pyup: < 4.1 # https://www.djangoproject.com/ django-environ==0.9.0 # https://github.com/joke2k/django-environ django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils -django-allauth==0.51.0 # https://github.com/pennersr/django-allauth +django-allauth==0.52.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.14.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 51abef1b8dccac6e89f14abcf195dc539f3407ed Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 29 Dec 2022 13:17:02 -0500 Subject: [PATCH 0087/1166] Update tox from 4.0.17 to 4.0.19 (#4030) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ec14de1c6..f5e828ad0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.0.17 +tox==4.0.19 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From f6c44d69563e99c588598505879e24498726d145 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 29 Dec 2022 13:30:50 -0500 Subject: [PATCH 0088/1166] Update tox from 4.0.19 to 4.1.0 (#4035) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f5e828ad0..ef0272058 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.0.19 +tox==4.1.0 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From 03e90149302cf5f17d16a57699c14f7589fe49ae Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 30 Dec 2022 02:22:45 +0000 Subject: [PATCH 0089/1166] Release 2022.12.29 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ff6f2286..aca668c5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2022.12.29 + +### Updated +- Update tox to 4.1.0 ([#4035](https://github.com/cookiecutter/cookiecutter-django/pull/4035)) +- Update tox to 4.0.19 ([#4030](https://github.com/cookiecutter/cookiecutter-django/pull/4030)) +- Update django-allauth to 0.52.0 ([#4033](https://github.com/cookiecutter/cookiecutter-django/pull/4033)) + ## 2022.12.26 ### Updated diff --git a/setup.py b/setup.py index e7ec62436..e03b72109 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.26" +version = "2022.12.29" with open("README.rst") as readme_file: long_description = readme_file.read() From a7f195680f52eec8b25eb48a59fc3d5639780592 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 1 Jan 2023 21:15:53 -0800 Subject: [PATCH 0090/1166] Update pillow from 9.3.0 to 9.4.0 --- {{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 8ae17ad60..e37caf3c7 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,6 +1,6 @@ pytz==2022.7 # https://github.com/stub42/pytz python-slugify==7.0.0 # https://github.com/un33k/python-slugify -Pillow==9.3.0 # https://github.com/python-pillow/Pillow +Pillow==9.4.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 522574d1b241a486ff5327d6033e0da0abea9296 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 2 Jan 2023 16:43:31 -0800 Subject: [PATCH 0091/1166] Update tox from 4.1.0 to 4.1.3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ef0272058..040189b28 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.1.0 +tox==4.1.3 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From af625635230bffc77cc0c6c8eebacee278cfcb18 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 2 Jan 2023 16:43:37 -0800 Subject: [PATCH 0092/1166] Update coverage from 7.0.1 to 7.0.2 --- {{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 22b0f0fa3..016880601 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==5.0.3 # https://github.com/gforcada/flake8-isort -coverage==7.0.1 # https://github.com/nedbat/coveragepy +coverage==7.0.2 # https://github.com/nedbat/coveragepy black==22.12.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From 3bb37120744d77cebedcec25dad12998adebbd6e Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 3 Jan 2023 04:30:22 -0800 Subject: [PATCH 0093/1166] Update whitenoise from 6.2.0 to 6.3.0 --- {{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 8ae17ad60..1c4507d84 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -10,7 +10,7 @@ rcssmin==1.1.0 # https://github.com/ndparker/rcssmin {%- endif %} argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} -whitenoise==6.2.0 # https://github.com/evansd/whitenoise +whitenoise==6.3.0 # https://github.com/evansd/whitenoise {%- endif %} redis==4.4.0 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} From f7b628092d5a18cbf7edc2ac58069f72a10545af Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 3 Jan 2023 13:31:12 -0500 Subject: [PATCH 0094/1166] Update flake8-isort to 6.0.0 (#4022) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update flake8-isort from 5.0.3 to 6.0.0 Co-authored-by: Fábio C. Barrionuevo da Luz --- 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 45167a17f..f514ad0f4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ binaryornot==0.4.4 black==22.12.0 isort==5.11.3 flake8==6.0.0 -flake8-isort==5.0.3 +flake8-isort==6.0.0 pre-commit==2.21.0 # Testing diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 016880601..a703dedf0 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -29,7 +29,7 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ flake8==6.0.0 # https://github.com/PyCQA/flake8 -flake8-isort==5.0.3 # https://github.com/gforcada/flake8-isort +flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort coverage==7.0.2 # https://github.com/nedbat/coveragepy black==22.12.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django From 065b994238a9cad8fa5481de021dcb08c807844b Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 4 Jan 2023 02:24:51 +0000 Subject: [PATCH 0095/1166] Release 2023.01.03 --- CHANGELOG.md | 10 ++++++++++ setup.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aca668c5f..69a9e780a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.01.03 + +### Updated +- Update flake8-isort to 6.0.0 ([#4022](https://github.com/cookiecutter/cookiecutter-django/pull/4022)) +- Update tox to 4.1.3 ([#4041](https://github.com/cookiecutter/cookiecutter-django/pull/4041)) +- Update pillow to 9.4.0 ([#4040](https://github.com/cookiecutter/cookiecutter-django/pull/4040)) +- Update gitpython to 3.1.30 ([#4032](https://github.com/cookiecutter/cookiecutter-django/pull/4032)) +- Update coverage to 7.0.2 ([#4042](https://github.com/cookiecutter/cookiecutter-django/pull/4042)) +- Update whitenoise to 6.3.0 ([#4044](https://github.com/cookiecutter/cookiecutter-django/pull/4044)) + ## 2022.12.29 ### Updated diff --git a/setup.py b/setup.py index e03b72109..90e524837 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2022.12.29" +version = "2023.01.03" with open("README.rst") as readme_file: long_description = readme_file.read() From 2da98ab87cc99420557aa0e84d3834886b8cc590 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 4 Jan 2023 07:22:18 -0500 Subject: [PATCH 0096/1166] Update coverage from 7.0.2 to 7.0.3 (#4047) --- {{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 a703dedf0..0bb99c1a6 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.0.2 # https://github.com/nedbat/coveragepy +coverage==7.0.3 # https://github.com/nedbat/coveragepy black==22.12.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From b00fde9a872da1a3ae2e9771e468074ad1da427b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 4 Jan 2023 07:24:21 -0500 Subject: [PATCH 0097/1166] Update tox from 4.1.3 to 4.2.1 (#4046) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f514ad0f4..412410843 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.1.3 +tox==4.2.1 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From ebcee95c8b055c9bb4bf18878badfb81b31354a1 Mon Sep 17 00:00:00 2001 From: Thomas Booij Date: Wed, 4 Jan 2023 16:33:02 +0100 Subject: [PATCH 0098/1166] Fix typo on the test settings (#4049) --- {{cookiecutter.project_slug}}/config/settings/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/test.py b/{{cookiecutter.project_slug}}/config/settings/test.py index f103eb10b..198b5aa5d 100644 --- a/{{cookiecutter.project_slug}}/config/settings/test.py +++ b/{{cookiecutter.project_slug}}/config/settings/test.py @@ -25,7 +25,7 @@ PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] # https://docs.djangoproject.com/en/dev/ref/settings/#email-backend EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend" -# DEBUGING FOR TEMPLATES +# DEBUGGING FOR TEMPLATES # ------------------------------------------------------------------------------ TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore # noqa F405 From abf9405a59656d4bd46685e256a2778579cf0601 Mon Sep 17 00:00:00 2001 From: luzfcb Date: Wed, 4 Jan 2023 15:33:47 +0000 Subject: [PATCH 0099/1166] 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 5c8b1f753..55a6df601 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1332,5 +1332,10 @@ "name": "TAKAHASHI Shuuji", "github_login": "shuuji3", "twitter_username": "" + }, + { + "name": "Thomas Booij", + "github_login": "ThomasBooij95", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index dba721de6..fbc8dd973 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1706,6 +1706,13 @@ Listed in alphabetical order. thibault + + Thomas Booij + + ThomasBooij95 + + + Théo Segonds From bd5ceb00481dfaac12e0c24e1e1011ac45c98d56 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 4 Jan 2023 15:51:37 -0500 Subject: [PATCH 0100/1166] Update tox from 4.2.1 to 4.2.2 (#4050) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 412410843..7db83d824 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.2.1 +tox==4.2.2 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From d7485fd93e587b13570f4d7755e594470ad901e8 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 5 Jan 2023 02:25:14 +0000 Subject: [PATCH 0101/1166] Release 2023.01.04 --- CHANGELOG.md | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69a9e780a..eb5f7b48f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.01.04 + +### Changed +- Fix typo on test settings ([#4049](https://github.com/cookiecutter/cookiecutter-django/pull/4049)) +### Updated +- Update tox to 4.2.2 ([#4050](https://github.com/cookiecutter/cookiecutter-django/pull/4050)) +- Update tox to 4.2.1 ([#4046](https://github.com/cookiecutter/cookiecutter-django/pull/4046)) +- Update coverage to 7.0.3 ([#4047](https://github.com/cookiecutter/cookiecutter-django/pull/4047)) + ## 2023.01.03 ### Updated diff --git a/setup.py b/setup.py index 90e524837..ba0475913 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.03" +version = "2023.01.04" with open("README.rst") as readme_file: long_description = readme_file.read() From 66be5ceab463307c25d42c979825960aadca2198 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Fri, 6 Jan 2023 09:48:39 -0800 Subject: [PATCH 0102/1166] Fix link, add non-Docker commands (#4036) --- docs/testing.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/testing.rst b/docs/testing.rst index dd6fcb48f..bea45c6dd 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -28,10 +28,15 @@ Coverage You should build your tests to provide the highest level of **code coverage**. You can run the ``pytest`` with code ``coverage`` by typing in the following command: :: - $ docker-compose -f local.yml run --rm django coverage run -m pytest + $ coverage run -m pytest Once the tests are complete, in order to see the code coverage, run the following command: :: + $ coverage report + +If you're running the project locally with Docker, use these commands instead: :: + + $ docker-compose -f local.yml run --rm django coverage run -m pytest $ docker-compose -f local.yml run --rm django coverage report .. note:: @@ -53,4 +58,4 @@ Once the tests are complete, in order to see the code coverage, run the followin .. _develop locally with docker: ./developing-locally-docker.html .. _customize: https://docs.pytest.org/en/latest/customize.html .. _unittest: https://docs.python.org/3/library/unittest.html#module-unittest -.. _configuring: https://coverage.readthedocs.io/en/v4.5.x/config.html +.. _configuring: https://coverage.readthedocs.io/en/latest/config.html From d5631b7d2a6363f6520adf38f869410f4330e389 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 6 Jan 2023 17:49:08 +0000 Subject: [PATCH 0103/1166] 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 55a6df601..9ba9955cc 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1337,5 +1337,10 @@ "name": "Thomas Booij", "github_login": "ThomasBooij95", "twitter_username": "" + }, + { + "name": "Pamela Fox", + "github_login": "pamelafox", + "twitter_username": "pamelafox" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index fbc8dd973..e54c1f650 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1461,6 +1461,13 @@ Listed in alphabetical order. + + Pamela Fox + + pamelafox + + pamelafox + Parbhat Puri From 84851ef6096d97bcf70ea11c3c94faf682411c2d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 6 Jan 2023 12:49:41 -0500 Subject: [PATCH 0104/1166] Update tox to 4.2.3 (#4051) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7db83d824..5db12aac8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.2.2 +tox==4.2.3 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From 62df4f44603e07f23f126a9e78da706c53a170f5 Mon Sep 17 00:00:00 2001 From: Robin <7276999+Kaffeetasse@users.noreply.github.com> Date: Fri, 6 Jan 2023 18:56:41 +0100 Subject: [PATCH 0105/1166] Add .git to .dockerignore (#4054) --- {{cookiecutter.project_slug}}/.dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_slug}}/.dockerignore b/{{cookiecutter.project_slug}}/.dockerignore index 5518e60af..7369480e3 100644 --- a/{{cookiecutter.project_slug}}/.dockerignore +++ b/{{cookiecutter.project_slug}}/.dockerignore @@ -8,3 +8,4 @@ .readthedocs.yml .travis.yml venv +.git From b9933f54afea71f6b94181f191c4040a13e9b0eb Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 6 Jan 2023 18:06:14 +0000 Subject: [PATCH 0106/1166] 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 9ba9955cc..34c84979d 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1342,5 +1342,10 @@ "name": "Pamela Fox", "github_login": "pamelafox", "twitter_username": "pamelafox" + }, + { + "name": "Robin", + "github_login": "Kaffeetasse", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e54c1f650..718d58c57 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1573,6 +1573,13 @@ Listed in alphabetical order. + + Robin + + Kaffeetasse + + + Roman Afanaskin From d91c2141eaa84f7fb0fe574e2d22a755169444ea Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 6 Jan 2023 10:50:05 -0800 Subject: [PATCH 0107/1166] Update rcssmin from 1.1.0 to 1.1.1 --- {{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 f4d2399de..16e96cc2b 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -5,7 +5,7 @@ Pillow==9.4.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %} rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin {%- else %} -rcssmin==1.1.0 # https://github.com/ndparker/rcssmin +rcssmin==1.1.1 # https://github.com/ndparker/rcssmin {%- endif %} {%- endif %} argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi From 9c23a17987cc4a737780bd11a39eb617a5cd42e4 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 6 Jan 2023 14:11:14 -0800 Subject: [PATCH 0108/1166] Update django-compressor from 4.1 to 4.3 --- {{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 f4d2399de..a20b98c18 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -36,7 +36,7 @@ django-allauth==0.52.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.14.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' %} -django-compressor==4.1 # https://github.com/django-compressor/django-compressor +django-compressor==4.3 # https://github.com/django-compressor/django-compressor {%- endif %} django-redis==5.2.0 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == 'y' %} From 3601d2a843f600ba5c6763825cce177c74b9b5ed Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 7 Jan 2023 02:23:16 +0000 Subject: [PATCH 0109/1166] Release 2023.01.06 --- CHANGELOG.md | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb5f7b48f..e84c56136 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.01.06 + +### Changed +- Add `.git` to `.dockerignore` ([#4054](https://github.com/cookiecutter/cookiecutter-django/pull/4054)) +- Fix link and add non-Docker commands to testing page in the docs ([#4036](https://github.com/cookiecutter/cookiecutter-django/pull/4036)) +### Updated +- Update tox to 4.2.3 ([#4051](https://github.com/cookiecutter/cookiecutter-django/pull/4051)) + ## 2023.01.04 ### Changed diff --git a/setup.py b/setup.py index ba0475913..6275646be 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.04" +version = "2023.01.06" with open("README.rst") as readme_file: long_description = readme_file.read() From 56143f7a5f8a6296cdc3b21dd5ec73f36875105b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 7 Jan 2023 08:27:47 -0500 Subject: [PATCH 0110/1166] Update isort to 5.11.4 (#4058) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5db12aac8..9d42222c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ black==22.12.0 -isort==5.11.3 +isort==5.11.4 flake8==6.0.0 flake8-isort==6.0.0 pre-commit==2.21.0 From f294c276ad8109ecdca8d0be9e3cb16fb75739a7 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 7 Jan 2023 08:29:18 -0500 Subject: [PATCH 0111/1166] Update django-storages to 1.13.2 (#4057) --- {{cookiecutter.project_slug}}/requirements/production.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index b7d73819b..04889fc27 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -17,11 +17,11 @@ hiredis==2.1.0 # https://github.com/redis/hiredis-py # Django # ------------------------------------------------------------------------------ {%- if cookiecutter.cloud_provider == 'AWS' %} -django-storages[boto3]==1.13.1 # https://github.com/jschneier/django-storages +django-storages[boto3]==1.13.2 # https://github.com/jschneier/django-storages {%- elif cookiecutter.cloud_provider == 'GCP' %} -django-storages[google]==1.13.1 # https://github.com/jschneier/django-storages +django-storages[google]==1.13.2 # https://github.com/jschneier/django-storages {%- elif cookiecutter.cloud_provider == 'Azure' %} -django-storages[azure]==1.13.1 # 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 From 5aecf924abd2661ab98db9c47434044f855e8669 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 7 Jan 2023 08:34:22 -0500 Subject: [PATCH 0112/1166] Update tox to 4.2.6 (#4064) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9d42222c7..bc164293d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.2.3 +tox==4.2.6 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From f6023ab21e8de386e847d03df2e6e90126ee6af6 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 8 Jan 2023 02:28:02 +0000 Subject: [PATCH 0113/1166] Release 2023.01.07 --- CHANGELOG.md | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e84c56136..f6ac1a9d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.01.07 + +### Updated +- Update tox to 4.2.6 ([#4064](https://github.com/cookiecutter/cookiecutter-django/pull/4064)) +- Update django-storages to 1.13.2 ([#4057](https://github.com/cookiecutter/cookiecutter-django/pull/4057)) +- Update isort to 5.11.4 ([#4058](https://github.com/cookiecutter/cookiecutter-django/pull/4058)) +- Update rcssmin to 1.1.1 ([#4060](https://github.com/cookiecutter/cookiecutter-django/pull/4060)) +- Update django-compressor to 4.3 ([#4063](https://github.com/cookiecutter/cookiecutter-django/pull/4063)) + ## 2023.01.06 ### Changed diff --git a/setup.py b/setup.py index 6275646be..91e605619 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.06" +version = "2023.01.07" with open("README.rst") as readme_file: long_description = readme_file.read() From 3e050c0f5b4f948734ecab11d51f626456fda5cd Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 8 Jan 2023 06:10:04 -0500 Subject: [PATCH 0114/1166] Update coverage from 7.0.3 to 7.0.4 (#4067) --- {{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 0bb99c1a6..b9b4d2008 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.0.3 # https://github.com/nedbat/coveragepy +coverage==7.0.4 # https://github.com/nedbat/coveragepy black==22.12.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From ce25e18a24a6acacfcafb86681dcf880adf6ff1b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 8 Jan 2023 06:10:19 -0500 Subject: [PATCH 0115/1166] Update redis from 4.4.0 to 4.4.1 (#4068) --- {{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 c4e809112..3a389eb08 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.3.0 # https://github.com/evansd/whitenoise {%- endif %} -redis==4.4.0 # https://github.com/redis/redis-py +redis==4.4.1 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==2.1.0 # https://github.com/redis/hiredis-py {%- endif %} From e23fe10add86836e6a78d2d1d9f402a19ea5d76a Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 9 Jan 2023 02:24:37 +0000 Subject: [PATCH 0116/1166] Release 2023.01.08 --- CHANGELOG.md | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6ac1a9d4..75cfa9795 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.01.08 + +### Updated +- Update redis to 4.4.1 ([#4068](https://github.com/cookiecutter/cookiecutter-django/pull/4068)) +- Update coverage to 7.0.4 ([#4067](https://github.com/cookiecutter/cookiecutter-django/pull/4067)) + ## 2023.01.07 ### Updated diff --git a/setup.py b/setup.py index 91e605619..ff9990b7b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.07" +version = "2023.01.08" with open("README.rst") as readme_file: long_description = readme_file.read() From 629785e1d4e43771e80c7b29375203852b95c06f Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Tue, 10 Jan 2023 00:57:05 -0800 Subject: [PATCH 0117/1166] Add .venv to exclude (#4069) --- {{cookiecutter.project_slug}}/setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/setup.cfg b/{{cookiecutter.project_slug}}/setup.cfg index b99bba644..7ee60215a 100644 --- a/{{cookiecutter.project_slug}}/setup.cfg +++ b/{{cookiecutter.project_slug}}/setup.cfg @@ -1,10 +1,10 @@ [flake8] max-line-length = 120 -exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv +exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv,.venv [pycodestyle] max-line-length = 120 -exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv +exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv,.venv [isort] line_length = 88 From 98ca314904baffc259c856d846bdc8030c4c6c7a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 10 Jan 2023 08:21:58 -0500 Subject: [PATCH 0118/1166] Update hiredis to 2.1.1 (#4070) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 3a389eb08..06be3c65c 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -14,7 +14,7 @@ whitenoise==6.3.0 # https://github.com/evansd/whitenoise {%- endif %} redis==4.4.1 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} -hiredis==2.1.0 # https://github.com/redis/hiredis-py +hiredis==2.1.1 # https://github.com/redis/hiredis-py {%- endif %} {%- if cookiecutter.use_celery == "y" %} celery==5.2.7 # pyup: < 6.0 # https://github.com/celery/celery diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 04889fc27..ce3e9f3fe 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -11,7 +11,7 @@ Collectfast==2.2.0 # https://github.com/antonagestam/collectfast sentry-sdk==1.12.1 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} -hiredis==2.1.0 # https://github.com/redis/hiredis-py +hiredis==2.1.1 # https://github.com/redis/hiredis-py {%- endif %} # Django From c4291e7522648dbf43f5d38956afc061ddaf8131 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Tue, 10 Jan 2023 15:11:53 -0800 Subject: [PATCH 0119/1166] Add dump.rdb to gitignore (#4062) --- {{cookiecutter.project_slug}}/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index ede26ef72..acc484307 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -326,6 +326,9 @@ Session.vim # Auto-generated tag files tags +# Redis dump file +dump.rdb + ### Project template {%- if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n' %} MailHog From 7b93aac85748df72cdadc0828532bb1c3ddf748b Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 11 Jan 2023 02:42:18 +0000 Subject: [PATCH 0120/1166] Release 2023.01.10 --- CHANGELOG.md | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75cfa9795..ecd6023af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.01.10 + +### Changed +- Add dump.rdb to gitignore ([#4062](https://github.com/cookiecutter/cookiecutter-django/pull/4062)) +### Fixed +- Exclude `.venv` from code style checks ([#4069](https://github.com/cookiecutter/cookiecutter-django/pull/4069)) +### Updated +- Update hiredis to 2.1.1 ([#4070](https://github.com/cookiecutter/cookiecutter-django/pull/4070)) + ## 2023.01.08 ### Updated diff --git a/setup.py b/setup.py index ff9990b7b..397500054 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.08" +version = "2023.01.10" with open("README.rst") as readme_file: long_description = readme_file.read() From 470eb70069e504940c273832dce040af843d69d4 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Wed, 11 Jan 2023 09:38:38 -0800 Subject: [PATCH 0121/1166] Update Celery instructions (#4061) Co-authored-by: Bruno Alla --- docs/developing-locally.rst | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index e1c946268..2b9438059 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -141,15 +141,32 @@ In production, we have Mailgun_ configured to have your back! Celery ------ -If the project is configured to use Celery as a task scheduler then by default tasks are set to run on the main thread -when developing locally. If you have the appropriate setup on your local machine then set the following -in ``config/settings/local.py``:: +If the project is configured to use Celery as a task scheduler then, by default, tasks are set to run on the main thread when developing locally instead of getting sent to a broker. However, if you have Redis setup on your local machine, you can set the following in ``config/settings/local.py``:: CELERY_TASK_ALWAYS_EAGER = False -To run Celery locally, make sure redis-server is installed (instructions are available at https://redis.io/topics/quickstart), run the server in one terminal with `redis-server`, and then start celery in another terminal with the following command:: +Next, make sure `redis-server` is installed (per the `Getting started with Redis`_ guide) and run the server in one terminal:: - celery -A config.celery_app worker --loglevel=info + $ redis-server + +Start the Celery worker by running the following command in another terminal:: + + $ celery -A config.celery_app worker --loglevel=info + +That Celery worker should be running whenever your app is running, typically as a background process, +so that it can pick up any tasks that get queued. Learn more from the `Celery Workers Guide`_. + +The project comes with a simple task for manual testing purposes, inside `/users/tasks.py`. To queue that task locally, start the Django shell, import the task, and call `delay()` on it:: + + $ python manage.py shell + >> from .users.tasks import get_users_count + >> get_users_count.delay() + +You can also use Django admin to queue up tasks, thanks to the `django-celerybeat`_ package. + +.. _Getting started with Redis guide: https://redis.io/docs/getting-started/ +.. _Celery Workers Guide: https://docs.celeryq.dev/en/stable/userguide/workers.html +.. _django-celerybeat: https://django-celery-beat.readthedocs.io/en/latest/ Sass Compilation & Live Reloading From f690119cd99903e3db62718f4534f3fe03e57163 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 11 Jan 2023 17:18:03 -0500 Subject: [PATCH 0122/1166] Update tox to 4.2.7 (#4073) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index bc164293d..4a604db16 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.2.6 +tox==4.2.7 pytest==7.2.0 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From 541c1dce9e5abf52076e39671b930efe9c834117 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 12 Jan 2023 02:41:37 +0000 Subject: [PATCH 0123/1166] Release 2023.01.11 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecd6023af..2cb53128c 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.01.11 + +### Changed +- Update Celery instructions in the documentation ([#4061](https://github.com/cookiecutter/cookiecutter-django/pull/4061)) +### Updated +- Update tox to 4.2.7 ([#4073](https://github.com/cookiecutter/cookiecutter-django/pull/4073)) + ## 2023.01.10 ### Changed diff --git a/setup.py b/setup.py index 397500054..5b1bc3b26 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.10" +version = "2023.01.11" with open("README.rst") as readme_file: long_description = readme_file.read() From fe6e6e85cbcd6dbb78d3427a6c971a74fecd5223 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 12 Jan 2023 13:28:26 -0500 Subject: [PATCH 0124/1166] Update sentry-sdk to 1.13.0 (#4074) --- {{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 ce3e9f3fe..fd449d1fe 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.12.1 # https://github.com/getsentry/sentry-python +sentry-sdk==1.13.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.1.1 # https://github.com/redis/hiredis-py From f50a2a5b0f5d9aa03a815be0e0c577f40983e67c Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 13 Jan 2023 02:46:24 +0000 Subject: [PATCH 0125/1166] Release 2023.01.12 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cb53128c..5269ac14d 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.01.12 + +### Updated +- Update sentry-sdk to 1.13.0 ([#4074](https://github.com/cookiecutter/cookiecutter-django/pull/4074)) + ## 2023.01.11 ### Changed diff --git a/setup.py b/setup.py index 5b1bc3b26..765459067 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.11" +version = "2023.01.12" with open("README.rst") as readme_file: long_description = readme_file.read() From 54df65c7779d7e0764645acd529ba5673d0090fe Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 15 Jan 2023 06:32:56 -0500 Subject: [PATCH 0126/1166] Update pytz from 2022.7 to 2022.7.1 (#4078) --- {{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 06be3c65c..38f8daabf 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,4 +1,4 @@ -pytz==2022.7 # https://github.com/stub42/pytz +pytz==2022.7.1 # https://github.com/stub42/pytz python-slugify==7.0.0 # https://github.com/un33k/python-slugify Pillow==9.4.0 # https://github.com/python-pillow/Pillow {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} From 5d07f3bb7ef142b7bd7a4d7e7f062775896ea021 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 15 Jan 2023 06:33:58 -0500 Subject: [PATCH 0127/1166] Update pytest to 7.2.1 (#4077) * Update pytest from 7.2.0 to 7.2.1 * Update pytest from 7.2.0 to 7.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 4a604db16..627cfebe5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ tox==4.2.7 -pytest==7.2.0 +pytest==7.2.1 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 b9b4d2008..89abc0a0e 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==0.982 # https://github.com/python/mypy django-stubs==1.13.1 # https://github.com/typeddjango/django-stubs -pytest==7.2.0 # https://github.com/pytest-dev/pytest +pytest==7.2.1 # 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.8.0 # https://github.com/typeddjango/djangorestframework-stubs From 3f53a2695b0824a1ccd1b62e866568fce53a2c08 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 16 Jan 2023 02:26:38 +0000 Subject: [PATCH 0128/1166] Release 2023.01.15 --- CHANGELOG.md | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5269ac14d..00698a012 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.01.15 + +### Updated +- Update pytest to 7.2.1 ([#4077](https://github.com/cookiecutter/cookiecutter-django/pull/4077)) +- Update pytz to 2022.7.1 ([#4078](https://github.com/cookiecutter/cookiecutter-django/pull/4078)) + ## 2023.01.12 ### Updated diff --git a/setup.py b/setup.py index 765459067..cdbbc6929 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.12" +version = "2023.01.15" with open("README.rst") as readme_file: long_description = readme_file.read() From 52af00670683ac20d42c4119580ab4a2fbe0109d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 17 Jan 2023 04:38:25 -0500 Subject: [PATCH 0129/1166] Update tox to 4.3.3 (#4081) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 627cfebe5..5dc9d97ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.2.7 +tox==4.3.3 pytest==7.2.1 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From 23b41967a854e023d0a63fa502ba13fba81ada8b Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 18 Jan 2023 02:27:46 +0000 Subject: [PATCH 0130/1166] Release 2023.01.17 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00698a012..344978d0a 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.01.17 + +### Updated +- Update tox to 4.3.3 ([#4081](https://github.com/cookiecutter/cookiecutter-django/pull/4081)) + ## 2023.01.15 ### Updated diff --git a/setup.py b/setup.py index cdbbc6929..1b0f44843 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.15" +version = "2023.01.17" with open("README.rst") as readme_file: long_description = readme_file.read() From be8aa5c73dc88259e819534a3bdb71f9364e82b9 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Thu, 19 Jan 2023 14:45:56 -0800 Subject: [PATCH 0131/1166] Add sourcemaps support to Gulp (#4089) fixes https://github.com/cookiecutter/cookiecutter-django/issues/4045 --- {{cookiecutter.project_slug}}/.gitignore | 1 + {{cookiecutter.project_slug}}/gulpfile.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index acc484307..17e9249c0 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -346,4 +346,5 @@ project.css project.min.css vendors.js *.min.js +*.min.js.map {%- endif %} diff --git a/{{cookiecutter.project_slug}}/gulpfile.js b/{{cookiecutter.project_slug}}/gulpfile.js index 680e3672e..40d367bcd 100644 --- a/{{cookiecutter.project_slug}}/gulpfile.js +++ b/{{cookiecutter.project_slug}}/gulpfile.js @@ -85,13 +85,13 @@ function scripts() { // Vendor Javascript minification function vendorScripts() { - return src(paths.vendorsJs) + return src(paths.vendorsJs, { sourcemaps: true }) .pipe(concat('vendors.js')) .pipe(dest(paths.js)) .pipe(plumber()) // Checks for errors .pipe(uglify()) // Minifies the js .pipe(rename({ suffix: '.min' })) - .pipe(dest(paths.js)) + .pipe(dest(paths.js, { sourcemaps: '.' })) } // Image compression From f4ab7bf671221195e5cd7241f2b551beff40594a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 19 Jan 2023 18:10:06 -0500 Subject: [PATCH 0132/1166] Update tox to 4.3.5 (#4087) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5dc9d97ab..6d0f15b64 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.21.0 # Testing # ------------------------------------------------------------------------------ -tox==4.3.3 +tox==4.3.5 pytest==7.2.1 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From 502d978e222f25f73f294067c5e4b0e655c04e73 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 19 Jan 2023 18:54:31 -0500 Subject: [PATCH 0133/1166] Update requests from 2.28.1 to 2.28.2 (#4090) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6d0f15b64..add5fb030 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,4 +23,4 @@ pyyaml==6.0 PyGithub==1.57 gitpython==3.1.30 jinja2==3.1.2 -requests==2.28.1 +requests==2.28.2 From 4576c70a5d902e9495fd58f5cd91f2badd7070e1 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 19 Jan 2023 18:55:31 -0500 Subject: [PATCH 0134/1166] Update redis from 4.4.1 to 4.4.2 (#4091) --- {{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 38f8daabf..6c29d5d2d 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.3.0 # https://github.com/evansd/whitenoise {%- endif %} -redis==4.4.1 # https://github.com/redis/redis-py +redis==4.4.2 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==2.1.1 # https://github.com/redis/hiredis-py {%- endif %} From c5b0db3c635ffaf2d601c536cf3be0f5016dc4e3 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 19 Jan 2023 18:56:01 -0500 Subject: [PATCH 0135/1166] Update coverage from 7.0.4 to 7.0.5 (#4092) --- {{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 89abc0a0e..6560033ef 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.0.4 # https://github.com/nedbat/coveragepy +coverage==7.0.5 # https://github.com/nedbat/coveragepy black==22.12.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From e5db124479b1004e339555a746c60489213812ac Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 20 Jan 2023 02:28:57 +0000 Subject: [PATCH 0136/1166] Release 2023.01.19 --- CHANGELOG.md | 10 ++++++++++ setup.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 344978d0a..c383e84f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.01.19 + +### Fixed +- Add sourcemaps support to Gulp ([#4089](https://github.com/cookiecutter/cookiecutter-django/pull/4089)) +### Updated +- Update coverage to 7.0.5 ([#4092](https://github.com/cookiecutter/cookiecutter-django/pull/4092)) +- Update redis to 4.4.2 ([#4091](https://github.com/cookiecutter/cookiecutter-django/pull/4091)) +- Update requests to 2.28.2 ([#4090](https://github.com/cookiecutter/cookiecutter-django/pull/4090)) +- Update tox to 4.3.5 ([#4087](https://github.com/cookiecutter/cookiecutter-django/pull/4087)) + ## 2023.01.17 ### Updated diff --git a/setup.py b/setup.py index 1b0f44843..53c2d0709 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.17" +version = "2023.01.19" with open("README.rst") as readme_file: long_description = readme_file.read() From 403298fcdcfbef64b897a4f9d0d3e23d4605fe7c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 21 Jan 2023 11:55:33 -0500 Subject: [PATCH 0137/1166] Update django-stubs from 1.13.1 to 1.13.2 (#4093) --- {{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 6560033ef..7436d32b9 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==0.982 # https://github.com/python/mypy -django-stubs==1.13.1 # https://github.com/typeddjango/django-stubs +django-stubs==1.13.2 # https://github.com/typeddjango/django-stubs pytest==7.2.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} From 4d087f98be29dd95832fd693411ea339413eecf1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 22 Jan 2023 02:28:22 +0000 Subject: [PATCH 0138/1166] Release 2023.01.21 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c383e84f5..6f347395a 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.01.21 + +### Updated +- Update django-stubs to 1.13.2 ([#4093](https://github.com/cookiecutter/cookiecutter-django/pull/4093)) + ## 2023.01.19 ### Fixed diff --git a/setup.py b/setup.py index 53c2d0709..d1e91c223 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.19" +version = "2023.01.21" with open("README.rst") as readme_file: long_description = readme_file.read() From 6a601208ea30e2d1d9c5188d08bc4ff4567a0de3 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 22 Jan 2023 09:54:59 -0500 Subject: [PATCH 0139/1166] Update django-compressor from 4.3 to 4.3.1 (#4094) --- {{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 6c29d5d2d..b695d5af8 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -36,7 +36,7 @@ django-allauth==0.52.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.14.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' %} -django-compressor==4.3 # https://github.com/django-compressor/django-compressor +django-compressor==4.3.1 # https://github.com/django-compressor/django-compressor {%- endif %} django-redis==5.2.0 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == 'y' %} From ca18b6dc7c58b04b1dc3270e29132109e6c46fe6 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 23 Jan 2023 02:25:09 +0000 Subject: [PATCH 0140/1166] Release 2023.01.22 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f347395a..494a67075 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.01.22 + +### Updated +- Update django-compressor to 4.3.1 ([#4094](https://github.com/cookiecutter/cookiecutter-django/pull/4094)) + ## 2023.01.21 ### Updated diff --git a/setup.py b/setup.py index d1e91c223..17ef3ffe5 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.21" +version = "2023.01.22" with open("README.rst") as readme_file: long_description = readme_file.read() From e2a7647d3c2327dc4335358ba7a315de5c4d6c18 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 23 Jan 2023 12:21:21 -0500 Subject: [PATCH 0141/1166] Update sentry-sdk to 1.14.0 (#4096) --- {{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 fd449d1fe..6936adffd 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.13.0 # https://github.com/getsentry/sentry-python +sentry-sdk==1.14.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.1.1 # https://github.com/redis/hiredis-py From 0cd6a66a262d26c4c84aeb3cc49de2e8a35b331f Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 24 Jan 2023 02:23:48 +0000 Subject: [PATCH 0142/1166] Release 2023.01.23 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 494a67075..a2187d744 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.01.23 + +### Updated +- Update sentry-sdk to 1.14.0 ([#4096](https://github.com/cookiecutter/cookiecutter-django/pull/4096)) + ## 2023.01.22 ### Updated diff --git a/setup.py b/setup.py index 17ef3ffe5..20df0c815 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.22" +version = "2023.01.23" with open("README.rst") as readme_file: long_description = readme_file.read() From 3361c75fbcf3305cd00bf4790838a5a75a215b97 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 24 Jan 2023 05:43:45 -0500 Subject: [PATCH 0143/1166] Update pre-commit to 3.0.0 (#4098) * Update pre-commit from 2.21.0 to 3.0.0 * Update pre-commit from 2.21.0 to 3.0.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 add5fb030..44e403020 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ black==22.12.0 isort==5.11.4 flake8==6.0.0 flake8-isort==6.0.0 -pre-commit==2.21.0 +pre-commit==3.0.0 # Testing # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 7436d32b9..782846f82 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==2.21.0 # https://github.com/pre-commit/pre-commit +pre-commit==3.0.0 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From 030b00177a98359ff4e81049ee05d6ca7aad67f9 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 25 Jan 2023 02:24:52 +0000 Subject: [PATCH 0144/1166] Release 2023.01.24 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2187d744..32cb28daa 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.01.24 + +### Updated +- Update pre-commit to 3.0.0 ([#4098](https://github.com/cookiecutter/cookiecutter-django/pull/4098)) + ## 2023.01.23 ### Updated diff --git a/setup.py b/setup.py index 20df0c815..0453c33ba 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.23" +version = "2023.01.24" with open("README.rst") as readme_file: long_description = readme_file.read() From 2dc964a8e3feb443b7c19a99ecd174e1b9230adf Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 25 Jan 2023 03:50:58 -0500 Subject: [PATCH 0145/1166] Update coverage from 7.0.5 to 7.1.0 (#4100) --- {{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 782846f82..447104dae 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.0.5 # https://github.com/nedbat/coveragepy +coverage==7.1.0 # https://github.com/nedbat/coveragepy black==22.12.0 # https://github.com/psf/black pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} From dfd8164ef82512e7ee62f5954a78af93fc72bc18 Mon Sep 17 00:00:00 2001 From: Patrick Tran Date: Wed, 25 Jan 2023 04:50:41 -0800 Subject: [PATCH 0146/1166] Update postgres and redis to point to mini tiers (#4099) * Update postgres and redis to point to mini tiers * Update deployment-on-heroku.rst * Update deployment-on-heroku.rst --- docs/deployment-on-heroku.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/deployment-on-heroku.rst b/docs/deployment-on-heroku.rst index e239b6593..71fb45dda 100644 --- a/docs/deployment-on-heroku.rst +++ b/docs/deployment-on-heroku.rst @@ -12,13 +12,13 @@ Run these commands to deploy the project to Heroku: heroku create --buildpack heroku/python - heroku addons:create heroku-postgresql:hobby-dev + heroku addons:create heroku-postgresql:mini # On Windows use double quotes for the time zone, e.g. # heroku pg:backups schedule --at "02:00 America/Los_Angeles" DATABASE_URL heroku pg:backups schedule --at '02:00 America/Los_Angeles' DATABASE_URL heroku pg:promote DATABASE_URL - heroku addons:create heroku-redis:hobby-dev + heroku addons:create heroku-redis:mini # Assuming you chose Mailgun as mail service (see below for others) heroku addons:create mailgun:starter @@ -125,4 +125,4 @@ which runs Gulp in cookiecutter-django. If things don't work, please refer to the Heroku docs. -.. _multiple buildpacks: https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app \ No newline at end of file +.. _multiple buildpacks: https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app From cb99f0d2115df1df2deb8716e79e6611309a10bd Mon Sep 17 00:00:00 2001 From: luzfcb Date: Wed, 25 Jan 2023 12:51:16 +0000 Subject: [PATCH 0147/1166] 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 34c84979d..9d60e5da1 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1347,5 +1347,10 @@ "name": "Robin", "github_login": "Kaffeetasse", "twitter_username": "" + }, + { + "name": "Patrick Tran", + "github_login": "theptrk", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 718d58c57..3d85b68ac 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1475,6 +1475,13 @@ Listed in alphabetical order. + + Patrick Tran + + theptrk + + + Pawan Chaurasia From 70014c2b45b5f794a4fd4c82cb73ad52255d17ce Mon Sep 17 00:00:00 2001 From: tildebox <61698441+tildebox@users.noreply.github.com> Date: Wed, 25 Jan 2023 23:55:08 +0100 Subject: [PATCH 0148/1166] Rename ROOT_DIR to BASE_DIR (#4086) Co-authored-by: example Fix https://github.com/cookiecutter/cookiecutter-django/issues/4075 --- tests/test_cookiecutter_generation.py | 4 ++-- {{cookiecutter.project_slug}}/config/asgi.py | 4 ++-- {{cookiecutter.project_slug}}/config/settings/base.py | 10 +++++----- {{cookiecutter.project_slug}}/config/wsgi.py | 4 ++-- .../merge_production_dotenvs_in_dotenv.py | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 6219f75ef..3a881cc64 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -134,11 +134,11 @@ def _fixture_id(ctx): return "-".join(f"{key}:{value}" for key, value in ctx.items()) -def build_files_list(root_dir): +def build_files_list(base_dir): """Build a list containing absolute paths to the generated files.""" return [ os.path.join(dirpath, file_path) - for dirpath, subdirs, files in os.walk(root_dir) + for dirpath, subdirs, files in os.walk(base_dir) for file_path in files ] diff --git a/{{cookiecutter.project_slug}}/config/asgi.py b/{{cookiecutter.project_slug}}/config/asgi.py index 8c99bbf53..65e76ca0a 100644 --- a/{{cookiecutter.project_slug}}/config/asgi.py +++ b/{{cookiecutter.project_slug}}/config/asgi.py @@ -15,8 +15,8 @@ from django.core.asgi import get_asgi_application # This allows easy placement of apps within the interior # {{ cookiecutter.project_slug }} directory. -ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent -sys.path.append(str(ROOT_DIR / "{{ cookiecutter.project_slug }}")) +BASE_DIR = Path(__file__).resolve(strict=True).parent.parent +sys.path.append(str(BASE_DIR / "{{ cookiecutter.project_slug }}")) # If DJANGO_SETTINGS_MODULE is unset, default to the local settings os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 6bf6a6e5c..44b03fa03 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -5,15 +5,15 @@ from pathlib import Path import environ -ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent +BASE_DIR = Path(__file__).resolve(strict=True).parent.parent.parent # {{ cookiecutter.project_slug }}/ -APPS_DIR = ROOT_DIR / "{{ cookiecutter.project_slug }}" +APPS_DIR = BASE_DIR / "{{ cookiecutter.project_slug }}" env = environ.Env() READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False) if READ_DOT_ENV_FILE: # OS environment variables take precedence over variables from .env - env.read_env(str(ROOT_DIR / ".env")) + env.read_env(str(BASE_DIR / ".env")) # GENERAL # ------------------------------------------------------------------------------ @@ -33,7 +33,7 @@ USE_I18N = True # https://docs.djangoproject.com/en/dev/ref/settings/#use-tz USE_TZ = True # https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths -LOCALE_PATHS = [str(ROOT_DIR / "locale")] +LOCALE_PATHS = [str(BASE_DIR / "locale")] # DATABASES # ------------------------------------------------------------------------------ @@ -159,7 +159,7 @@ MIDDLEWARE = [ # STATIC # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#static-root -STATIC_ROOT = str(ROOT_DIR / "staticfiles") +STATIC_ROOT = str(BASE_DIR / "staticfiles") # https://docs.djangoproject.com/en/dev/ref/settings/#static-url STATIC_URL = "/static/" # https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS diff --git a/{{cookiecutter.project_slug}}/config/wsgi.py b/{{cookiecutter.project_slug}}/config/wsgi.py index a7de581ca..3fd809ef3 100644 --- a/{{cookiecutter.project_slug}}/config/wsgi.py +++ b/{{cookiecutter.project_slug}}/config/wsgi.py @@ -21,8 +21,8 @@ from django.core.wsgi import get_wsgi_application # This allows easy placement of apps within the interior # {{ cookiecutter.project_slug }} directory. -ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent -sys.path.append(str(ROOT_DIR / "{{ cookiecutter.project_slug }}")) +BASE_DIR = Path(__file__).resolve(strict=True).parent.parent +sys.path.append(str(BASE_DIR / "{{ cookiecutter.project_slug }}")) # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks # if running multiple sites in the same mod_wsgi process. To fix this, use # mod_wsgi daemon mode with each site in its own daemon process, or use diff --git a/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py b/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py index d702a5f67..e5f82504a 100644 --- a/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py +++ b/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py @@ -4,13 +4,13 @@ from pathlib import Path import pytest -ROOT_DIR_PATH = Path(__file__).parent.resolve() -PRODUCTION_DOTENVS_DIR_PATH = ROOT_DIR_PATH / ".envs" / ".production" +BASE_DIR_PATH = Path(__file__).parent.resolve() +PRODUCTION_DOTENVS_DIR_PATH = BASE_DIR_PATH / ".envs" / ".production" PRODUCTION_DOTENV_FILE_PATHS = [ PRODUCTION_DOTENVS_DIR_PATH / ".django", PRODUCTION_DOTENVS_DIR_PATH / ".postgres", ] -DOTENV_FILE_PATH = ROOT_DIR_PATH / ".env" +DOTENV_FILE_PATH = BASE_DIR_PATH / ".env" def merge( From 56f6ba922d8c3f3151f2e2a6b6b430706e958181 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Wed, 25 Jan 2023 23:40:00 +0000 Subject: [PATCH 0149/1166] 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 9d60e5da1..0f923e027 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1352,5 +1352,10 @@ "name": "Patrick Tran", "github_login": "theptrk", "twitter_username": "" + }, + { + "name": "tildebox", + "github_login": "tildebox", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 3d85b68ac..57194bca3 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1741,6 +1741,13 @@ Listed in alphabetical order. + + tildebox + + tildebox + + + Tim Claessens From ef461f9231a4509175d2ef510fb40dd7ec840883 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 26 Jan 2023 02:25:13 +0000 Subject: [PATCH 0150/1166] Release 2023.01.25 --- CHANGELOG.md | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32cb28daa..5b1b47b52 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.01.25 + +### Changed +- Rename ROOT_DIR to BASE_DIR ([#4086](https://github.com/cookiecutter/cookiecutter-django/pull/4086)) +- Update postgres and redis to point to mini tiers ([#4099](https://github.com/cookiecutter/cookiecutter-django/pull/4099)) +### Updated +- Update coverage to 7.1.0 ([#4100](https://github.com/cookiecutter/cookiecutter-django/pull/4100)) + ## 2023.01.24 ### Updated diff --git a/setup.py b/setup.py index 0453c33ba..9dd893f97 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.24" +version = "2023.01.25" with open("README.rst") as readme_file: long_description = readme_file.read() From 7fcdeeae88ad998b652c518c86e91aed13e6a6dd Mon Sep 17 00:00:00 2001 From: tildebox <61698441+tildebox@users.noreply.github.com> Date: Thu, 26 Jan 2023 09:50:33 +0100 Subject: [PATCH 0151/1166] Rename BASE_DIR_PATH to BASE_DIR (#4102) Co-authored-by: example --- .../merge_production_dotenvs_in_dotenv.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py b/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py index e5f82504a..80780ead5 100644 --- a/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py +++ b/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py @@ -4,13 +4,13 @@ from pathlib import Path import pytest -BASE_DIR_PATH = Path(__file__).parent.resolve() -PRODUCTION_DOTENVS_DIR_PATH = BASE_DIR_PATH / ".envs" / ".production" +BASE_DIR = Path(__file__).parent.resolve() +PRODUCTION_DOTENVS_DIR_PATH = BASE_DIR / ".envs" / ".production" PRODUCTION_DOTENV_FILE_PATHS = [ PRODUCTION_DOTENVS_DIR_PATH / ".django", PRODUCTION_DOTENVS_DIR_PATH / ".postgres", ] -DOTENV_FILE_PATH = BASE_DIR_PATH / ".env" +DOTENV_FILE_PATH = BASE_DIR / ".env" def merge( From 099e49b7284e8f74f9ddf2c8a485d2cb3056246f Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 26 Jan 2023 05:40:44 -0500 Subject: [PATCH 0152/1166] Update tox to 4.4.2 (#4101) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 44e403020..62e005a5b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==3.0.0 # Testing # ------------------------------------------------------------------------------ -tox==4.3.5 +tox==4.4.2 pytest==7.2.1 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From 80405234c8e8ee16adb579a8e2d0b595efd505b3 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 26 Jan 2023 15:21:47 -0500 Subject: [PATCH 0153/1166] Update pre-commit to 3.0.1 (#4104) --- 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 62e005a5b..ab9c8c8b8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ black==22.12.0 isort==5.11.4 flake8==6.0.0 flake8-isort==6.0.0 -pre-commit==3.0.0 +pre-commit==3.0.1 # Testing # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 447104dae..609b49789 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.0.0 # https://github.com/pre-commit/pre-commit +pre-commit==3.0.1 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From 8ba930cd488f82989412f440ae3632a8751b706b Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 27 Jan 2023 02:27:06 +0000 Subject: [PATCH 0154/1166] Release 2023.01.26 --- CHANGELOG.md | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b1b47b52..32b3850fa 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.01.26 + +### Changed +- Rename BASE_DIR_PATH to BASE_DIR ([#4102](https://github.com/cookiecutter/cookiecutter-django/pull/4102)) +### Updated +- Update pre-commit to 3.0.1 ([#4104](https://github.com/cookiecutter/cookiecutter-django/pull/4104)) +- Update tox to 4.4.2 ([#4101](https://github.com/cookiecutter/cookiecutter-django/pull/4101)) + ## 2023.01.25 ### Changed diff --git a/setup.py b/setup.py index 9dd893f97..8e98d5142 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.25" +version = "2023.01.26" with open("README.rst") as readme_file: long_description = readme_file.read() From 900473777d9a80bf3e127d9b9b959a2257bb3202 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 27 Jan 2023 15:34:29 -0500 Subject: [PATCH 0155/1166] Update django-stubs to 1.14.0 (#4103) --- {{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 609b49789..ef0342a32 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==0.982 # https://github.com/python/mypy -django-stubs==1.13.2 # https://github.com/typeddjango/django-stubs +django-stubs==1.14.0 # https://github.com/typeddjango/django-stubs pytest==7.2.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} From 0f635887b40e862769cec781a3a3f9fd85ddec7a Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 28 Jan 2023 02:26:35 +0000 Subject: [PATCH 0156/1166] Release 2023.01.27 --- CHANGELOG.md | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32b3850fa..a55da25e5 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.01.27 + +### Updated +- Update django-stubs to 1.14.0 ([#4103](https://github.com/cookiecutter/cookiecutter-django/pull/4103)) + ## 2023.01.26 ### Changed diff --git a/setup.py b/setup.py index 8e98d5142..5adbbc664 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.26" +version = "2023.01.27" with open("README.rst") as readme_file: long_description = readme_file.read() From c0e83b104cd0713c8be80d55cda95d821f14a58d Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 28 Jan 2023 15:10:45 +0000 Subject: [PATCH 0157/1166] Refactor `merge_production_dotenvs_in_dotenv.py` (#4105) --- hooks/post_gen_project.py | 1 + .../merge_production_dotenvs_in_dotenv.py | 67 ++++--------------- ...test_merge_production_dotenvs_in_dotenv.py | 34 ++++++++++ 3 files changed, 48 insertions(+), 54 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/tests/test_merge_production_dotenvs_in_dotenv.py diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 9c3d946c1..5655b61f9 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -293,6 +293,7 @@ def set_flags_in_settings_files(): def remove_envs_and_associated_files(): shutil.rmtree(".envs") os.remove("merge_production_dotenvs_in_dotenv.py") + shutil.rmtree("tests") def remove_celery_compose_dirs(): diff --git a/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py b/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py index 80780ead5..35139fb2e 100644 --- a/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py +++ b/{{cookiecutter.project_slug}}/merge_production_dotenvs_in_dotenv.py @@ -2,66 +2,25 @@ import os from collections.abc import Sequence from pathlib import Path -import pytest - BASE_DIR = Path(__file__).parent.resolve() -PRODUCTION_DOTENVS_DIR_PATH = BASE_DIR / ".envs" / ".production" -PRODUCTION_DOTENV_FILE_PATHS = [ - PRODUCTION_DOTENVS_DIR_PATH / ".django", - PRODUCTION_DOTENVS_DIR_PATH / ".postgres", +PRODUCTION_DOTENVS_DIR = BASE_DIR / ".envs" / ".production" +PRODUCTION_DOTENV_FILES = [ + PRODUCTION_DOTENVS_DIR / ".django", + PRODUCTION_DOTENVS_DIR / ".postgres", ] -DOTENV_FILE_PATH = BASE_DIR / ".env" +DOTENV_FILE = BASE_DIR / ".env" def merge( - output_file_path: str, merged_file_paths: Sequence[str], append_linesep: bool = True + output_file: Path, + files_to_merge: Sequence[Path], ) -> None: - with open(output_file_path, "w") as output_file: - for merged_file_path in merged_file_paths: - with open(merged_file_path) as merged_file: - merged_file_content = merged_file.read() - output_file.write(merged_file_content) - if append_linesep: - output_file.write(os.linesep) - - -def main(): - merge(DOTENV_FILE_PATH, PRODUCTION_DOTENV_FILE_PATHS) - - -@pytest.mark.parametrize("merged_file_count", range(3)) -@pytest.mark.parametrize("append_linesep", [True, False]) -def test_merge(tmpdir_factory, merged_file_count: int, append_linesep: bool): - tmp_dir_path = Path(str(tmpdir_factory.getbasetemp())) - - output_file_path = tmp_dir_path / ".env" - - expected_output_file_content = "" - merged_file_paths = [] - for i in range(merged_file_count): - merged_file_ord = i + 1 - - merged_filename = f".service{merged_file_ord}" - merged_file_path = tmp_dir_path / merged_filename - - merged_file_content = merged_filename * merged_file_ord - - with open(merged_file_path, "w+") as file: - file.write(merged_file_content) - - expected_output_file_content += merged_file_content - if append_linesep: - expected_output_file_content += os.linesep - - merged_file_paths.append(merged_file_path) - - merge(output_file_path, merged_file_paths, append_linesep) - - with open(output_file_path) as output_file: - actual_output_file_content = output_file.read() - - assert actual_output_file_content == expected_output_file_content + merged_content = "" + for merge_file in files_to_merge: + merged_content += merge_file.read_text() + merged_content += os.linesep + output_file.write_text(merged_content) if __name__ == "__main__": - main() + merge(DOTENV_FILE, PRODUCTION_DOTENV_FILES) diff --git a/{{cookiecutter.project_slug}}/tests/test_merge_production_dotenvs_in_dotenv.py b/{{cookiecutter.project_slug}}/tests/test_merge_production_dotenvs_in_dotenv.py new file mode 100644 index 000000000..c0e68f60a --- /dev/null +++ b/{{cookiecutter.project_slug}}/tests/test_merge_production_dotenvs_in_dotenv.py @@ -0,0 +1,34 @@ +from pathlib import Path + +import pytest + +from merge_production_dotenvs_in_dotenv import merge + + +@pytest.mark.parametrize( + ("input_contents", "expected_output"), + [ + ([], ""), + ([""], "\n"), + (["JANE=doe"], "JANE=doe\n"), + (["SEP=true", "AR=ator"], "SEP=true\nAR=ator\n"), + (["A=0", "B=1", "C=2"], "A=0\nB=1\nC=2\n"), + (["X=x\n", "Y=y", "Z=z\n"], "X=x\n\nY=y\nZ=z\n\n"), + ], +) +def test_merge( + tmp_path: Path, + input_contents: list[str], + expected_output: str, +): + output_file = tmp_path / ".env" + + files_to_merge = [] + for num, input_content in enumerate(input_contents, start=1): + merge_file = tmp_path / f".service{num}" + merge_file.write_text(input_content) + files_to_merge.append(merge_file) + + merge(output_file, files_to_merge) + + assert output_file.read_text() == expected_output From c09fa55b367b11ffcbce7d1875b8aade5b0f9c11 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 28 Jan 2023 17:47:29 +0000 Subject: [PATCH 0158/1166] Auto-update pre-commit hooks (#4108) 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 ca86e7eb5..0617dd66c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.11.4 + rev: 5.12.0 hooks: - id: isort diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index c1aaf0d9f..a273bdf17 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.11.4 + rev: 5.12.0 hooks: - id: isort From fdf9ba27f1a0aa73a7a9686506efcb763ffc9fee Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 28 Jan 2023 13:52:00 -0500 Subject: [PATCH 0159/1166] Update isort to 5.12.0 (#4109) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ab9c8c8b8..2b7c69d33 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ black==22.12.0 -isort==5.11.4 +isort==5.12.0 flake8==6.0.0 flake8-isort==6.0.0 pre-commit==3.0.1 From 8584bafdfed9f5aa31945e4bfd800e664b2a6137 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 29 Jan 2023 02:28:47 +0000 Subject: [PATCH 0160/1166] Release 2023.01.28 --- CHANGELOG.md | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a55da25e5..0c317f025 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.01.28 + +### Changed +- Refactor `merge_production_dotenvs_in_dotenv.py` ([#4105](https://github.com/cookiecutter/cookiecutter-django/pull/4105)) +### Updated +- Update isort to 5.12.0 ([#4109](https://github.com/cookiecutter/cookiecutter-django/pull/4109)) +- Auto-update pre-commit hooks ([#4108](https://github.com/cookiecutter/cookiecutter-django/pull/4108)) + ## 2023.01.27 ### Updated diff --git a/setup.py b/setup.py index 5adbbc664..f8321406d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.01.27" +version = "2023.01.28" with open("README.rst") as readme_file: long_description = readme_file.read() From 977ffd91a3d389bda19d680ed26f24b63c341fe2 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 29 Jan 2023 11:45:13 +0000 Subject: [PATCH 0161/1166] Remove BrokenLinkEmailsMiddleware (#4112) --- {{cookiecutter.project_slug}}/config/settings/base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 44b03fa03..3d93ffb43 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -152,7 +152,6 @@ MIDDLEWARE = [ "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", - "django.middleware.common.BrokenLinkEmailsMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", ] From cbb0e19de75eed12cfa84ca4e6d6e8a34ebe926e Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 29 Jan 2023 12:12:12 +0000 Subject: [PATCH 0162/1166] Add Webpack support (#3623) * Add support for Webpack as frontend pipeline * Rename CI jobs * Fix a couple of issues with Webpack + Docker * Don't include Boostrap CSS from CDN with Webpack * Rename variable * Set publicPath in prod webpack config * Fix removal of SASS files in post-gen hooks * Add Webpack to readme usage section * Run Django + Webpack dev server concurrently without Docker * Fix async runserver command with Gulp/Webpack * Upgrade django-webpack-loader to 1.5.0 * Pass variables required by Webpack at build time * Upgrade django-webpack-loader to 1.7.0 * Add missing condition * Add support for Azure Storage + Webpack * Whitespaces * Rename ROOT_DIR -> BASE_DIR * Rename jobs * Bump django-webpack-loader to latest * Document limitation of Docker + Webpack + no Whitenoise * Update section on custom Bootstrap compilation in generated readme --- .github/workflows/ci.yml | 22 ++-- README.md | 3 +- cookiecutter.json | 3 +- docs/deployment-on-heroku.rst | 8 +- docs/deployment-with-docker.rst | 26 ++++ docs/developing-locally.rst | 2 +- docs/project-generation-options.rst | 6 +- docs/troubleshooting.rst | 12 +- hooks/post_gen_project.py | 111 +++++++++++++++++- tests/test_bare.sh | 6 +- tests/test_cookiecutter_generation.py | 1 + tests/test_docker.sh | 6 + {{cookiecutter.project_slug}}/.gitignore | 4 + .../docker_compose_up_django.xml | 2 +- .../.idea/{{cookiecutter.project_slug}}.iml | 2 +- {{cookiecutter.project_slug}}/README.md | 7 +- .../compose/production/django/Dockerfile | 18 ++- .../config/settings/base.py | 16 +++ .../config/settings/local.py | 8 +- {{cookiecutter.project_slug}}/gulpfile.js | 4 +- {{cookiecutter.project_slug}}/local.yml | 4 +- {{cookiecutter.project_slug}}/package.json | 29 ++++- {{cookiecutter.project_slug}}/production.yml | 13 ++ .../requirements/base.txt | 7 +- .../webpack/common.config.js | 55 +++++++++ .../webpack/dev.config.js | 20 ++++ .../webpack/prod.config.js | 28 +++++ .../static/js/project.js | 4 + .../static/js/vendors.js | 2 + .../static/sass/project.scss | 2 +- .../templates/base.html | 17 ++- 31 files changed, 399 insertions(+), 49 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/webpack/common.config.js create mode 100644 {{cookiecutter.project_slug}}/webpack/dev.config.js create mode 100644 {{cookiecutter.project_slug}}/webpack/prod.config.js create mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/js/vendors.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d466f4032..08ac54d86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - windows-latest - macOS-latest - name: "Run tests" + name: "pytest ${{ matrix.os }}" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -49,10 +49,14 @@ jobs: script: - name: Basic args: "" - - name: Extended - args: "use_celery=y use_drf=y frontend_pipeline=Gulp" + - name: Celery & DRF + args: "use_celery=y use_drf=y" + - name: Gulp + args: "frontend_pipeline=Gulp" + - name: Webpack + args: "frontend_pipeline=Webpack" - name: "${{ matrix.script.name }} Docker" + name: "Docker ${{ matrix.script.name }}" runs-on: ubuntu-latest env: DOCKER_BUILDKIT: 1 @@ -74,12 +78,14 @@ jobs: fail-fast: false matrix: script: - - name: With Celery + - name: Celery args: "use_celery=y frontend_pipeline='Django Compressor'" - - name: With Gulp - args: "frontend_pipeline='Gulp'" + - name: Gulp + args: "frontend_pipeline=Gulp" + - name: Webpack + args: "frontend_pipeline=Webpack" - name: "${{ matrix.script.name }} Bare metal" + name: "Bare metal ${{ matrix.script.name }}" runs-on: ubuntu-latest services: redis: diff --git a/README.md b/README.md index d8fc58ec4..0697862c5 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ production-ready Django projects quickly. - Registration via [django-allauth](https://github.com/pennersr/django-allauth) - Comes with custom user model ready to go - Optional basic ASGI setup for Websockets -- Optional custom static build using Gulp and livereload +- 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 - 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) @@ -149,6 +149,7 @@ Answer the prompts with your own desired [options](http://cookiecutter-django.re 1 - None 2 - Django Compressor 3 - Gulp + 4 - Webpack Choose from 1, 2, 3, 4 [1]: 1 use_celery [n]: y use_mailhog [n]: n diff --git a/cookiecutter.json b/cookiecutter.json index 970411013..cf4da9a45 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -46,7 +46,8 @@ "frontend_pipeline": [ "None", "Django Compressor", - "Gulp" + "Gulp", + "Webpack" ], "use_celery": "n", "use_mailhog": "n", diff --git a/docs/deployment-on-heroku.rst b/docs/deployment-on-heroku.rst index 71fb45dda..71c6e11b2 100644 --- a/docs/deployment-on-heroku.rst +++ b/docs/deployment-on-heroku.rst @@ -109,10 +109,10 @@ Or add the DSN for your account, if you already have one: .. _Sentry add-on: https://elements.heroku.com/addons/sentry -Gulp & Bootstrap compilation -++++++++++++++++++++++++++++ +Gulp or Webpack ++++++++++++++++ -If you've opted for Gulp, you'll most likely need to setup +If you've opted for Gulp or Webpack as frontend pipeline, you'll most likely need to setup your app to use `multiple buildpacks`_: one for Python & one for Node.js: .. code-block:: bash @@ -121,7 +121,7 @@ your app to use `multiple buildpacks`_: one for Python & one for Node.js: At time of writing, this should do the trick: during deployment, the Heroku should run ``npm install`` and then ``npm build``, -which runs Gulp in cookiecutter-django. +which run the SASS compilation & JS bundling. If things don't work, please refer to the Heroku docs. diff --git a/docs/deployment-with-docker.rst b/docs/deployment-with-docker.rst index fcce7e6f5..a431679bf 100644 --- a/docs/deployment-with-docker.rst +++ b/docs/deployment-with-docker.rst @@ -84,6 +84,32 @@ You can read more about this feature and how to configure it, at `Automatic HTTP .. _Automatic HTTPS: https://docs.traefik.io/https/acme/ +.. _webpack-whitenoise-limitation: + +Webpack without Whitenoise limitation +------------------------------------- + +If you opt for Webpack without Whitenoise, Webpack needs to know the static URL at build time, when running ``docker-compose build`` (See ``webpack/prod.config.js``). Depending on your setup, this URL may come from the following environment variables: + +- ``AWS_STORAGE_BUCKET_NAME`` +- ``DJANGO_AWS_S3_CUSTOM_DOMAIN`` +- ``DJANGO_GCP_STORAGE_BUCKET_NAME`` +- ``DJANGO_AZURE_CONTAINER_NAME`` + +The Django settings are getting these values at runtime via the ``.envs/.production/.django`` file , but Docker does not read this file at build time, it only look for a ``.env`` in the root of the project. Failing to pass the values correctly will result in a page without CSS styles nor javascript. + +To solve this, you can either: + +1. merge all the env files into ``.env`` by running:: + + merge_production_dotenvs_in_dotenv.py + +2. create a ``.env`` file in the root of the project with just variables you need. You'll need to also define them in ``.envs/.production/.django`` (hence duplicating them). +3. set these variables when running the build command:: + + DJANGO_AWS_S3_CUSTOM_DOMAIN=example.com docker-compose -f production.yml build``. + +None of these options are ideal, we're open to suggestions on how to improve this. If you think you have one, please open an issue or a pull request. (Optional) Postgres Data Volume Modifications --------------------------------------------- diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index 2b9438059..fb66536fc 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -172,7 +172,7 @@ You can also use Django admin to queue up tasks, thanks to the `django-celerybea Sass Compilation & Live Reloading --------------------------------- -If you've opted for Gulp as front-end pipeline, the project comes configured with `Sass`_ compilation and `live reloading`_. As you change you Sass/JS source files, the task runner will automatically rebuild the corresponding CSS and JS assets and reload them in your browser without refreshing the page. +If you've opted for Gulp or Webpack as front-end pipeline, the project comes configured with `Sass`_ compilation and `live reloading`_. As you change you Sass/JS source files, the task runner will automatically rebuild the corresponding CSS and JS assets and reload them in your browser without refreshing the page. #. Make sure that `Node.js`_ v16 is installed on your machine. #. In the project root, install the JS dependencies with:: diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 0560badd3..d4ad8a9aa 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -95,7 +95,10 @@ frontend_pipeline: 1. None 2. `Django Compressor`_ - 3. `Gulp`_: support Bootstrap recompilation with real-time variables alteration. + 3. `Gulp`_ + 4. `Webpack`_ + +Both Gulp and Webpack support Bootstrap recompilation with real-time variables alteration. use_celery: Indicates whether the project should be configured to use Celery_. @@ -145,6 +148,7 @@ debug: .. _PostgreSQL: https://www.postgresql.org/docs/ .. _Gulp: https://github.com/gulpjs/gulp +.. _Webpack: https://webpack.js.org .. _AWS: https://aws.amazon.com/s3/ .. _GCP: https://cloud.google.com/storage/ diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index ba8ab53e6..293e9b652 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -1,5 +1,5 @@ Troubleshooting -===================================== +=============== This page contains some advice about errors and problems commonly encountered during the development of Cookiecutter Django applications. @@ -38,6 +38,16 @@ To fix this, you can either: .. _rm: https://docs.docker.com/engine/reference/commandline/volume_rm/ .. _prune: https://docs.docker.com/v17.09/engine/reference/commandline/system_prune/ +Variable is not set. Defaulting to a blank string +------------------------------------------------- + +Example:: + + WARN[0000] The "DJANGO_AWS_STORAGE_BUCKET_NAME" variable is not set. Defaulting to a blank string. + WARN[0000] The "DJANGO_AWS_S3_CUSTOM_DOMAIN" variable is not set. Defaulting to a blank string. + +You have probably opted for Docker + Webpack without Whitenoise. This is a know limitation of the combination, which needs a little bit of manual intervention. See the :ref:`dedicated section about it `. + Others ------ diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 5655b61f9..b64bbbafd 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -10,6 +10,7 @@ TODO: restrict Cookiecutter Django project initialization to """ from __future__ import print_function +import json import os import random import shutil @@ -87,15 +88,30 @@ def remove_heroku_build_hooks(): shutil.rmtree("bin") +def remove_sass_files(): + shutil.rmtree(os.path.join("{{cookiecutter.project_slug}}", "static", "sass")) + + def remove_gulp_files(): file_names = ["gulpfile.js"] for file_name in file_names: os.remove(file_name) - remove_sass_files() -def remove_sass_files(): - shutil.rmtree(os.path.join("{{cookiecutter.project_slug}}", "static", "sass")) +def remove_webpack_files(): + shutil.rmtree("webpack") + remove_vendors_js() + + +def remove_vendors_js(): + vendors_js_path = os.path.join( + "{{ cookiecutter.project_slug }}", + "static", + "js", + "vendors.js", + ) + if os.path.exists(vendors_js_path): + os.remove(vendors_js_path) def remove_packagejson_file(): @@ -104,6 +120,83 @@ def remove_packagejson_file(): os.remove(file_name) +def update_package_json(remove_dev_deps=None, remove_keys=None, scripts=None): + remove_dev_deps = remove_dev_deps or [] + remove_keys = remove_keys or [] + scripts = scripts or {} + with open("package.json", mode="r") as fd: + content = json.load(fd) + for package_name in remove_dev_deps: + content["devDependencies"].pop(package_name) + for key in remove_keys: + content.pop(key) + content["scripts"].update(scripts) + with open("package.json", mode="w") as fd: + json.dump(content, fd, ensure_ascii=False, indent=2) + fd.write("\n") + + +def handle_js_runner(choice, use_docker, use_async): + if choice == "Gulp": + update_package_json( + remove_dev_deps=[ + "@babel/core", + "@babel/preset-env", + "babel-loader", + "concurrently", + "css-loader", + "mini-css-extract-plugin", + "postcss-loader", + "postcss-preset-env", + "sass-loader", + "webpack", + "webpack-bundle-tracker", + "webpack-cli", + "webpack-dev-server", + "webpack-merge", + ], + remove_keys=["babel"], + scripts={ + "dev": "gulp", + "build": "gulp generate-assets", + }, + ) + remove_webpack_files() + elif choice == "Webpack": + scripts = { + "dev": "webpack serve --config webpack/dev.config.js", + "build": "webpack --config webpack/prod.config.js", + } + remove_dev_deps = [ + "browser-sync", + "cssnano", + "gulp", + "gulp-imagemin", + "gulp-plumber", + "gulp-postcss", + "gulp-rename", + "gulp-sass", + "gulp-uglify-es", + ] + if not use_docker: + dev_django_cmd = ( + "uvicorn config.asgi:application --reload" + if use_async + else "python manage.py runserver_plus" + ) + scripts.update( + { + "dev": "concurrently npm:dev:*", + "dev:webpack": "webpack serve --config webpack/dev.config.js", + "dev:django": dev_django_cmd, + } + ) + else: + remove_dev_deps.append("concurrently") + update_package_json(remove_dev_deps=remove_dev_deps, scripts=scripts) + remove_gulp_files() + + def remove_celery_files(): file_names = [ os.path.join("config", "celery_app.py"), @@ -384,13 +477,21 @@ def main(): if "{{ cookiecutter.keep_local_envs_in_vcs }}".lower() == "y": append_to_gitignore_file("!.envs/.local/") - if "{{ cookiecutter.frontend_pipeline }}" != "Gulp": + if "{{ cookiecutter.frontend_pipeline }}" in ["None", "Django Compressor"]: remove_gulp_files() + remove_webpack_files() + remove_sass_files() remove_packagejson_file() if "{{ cookiecutter.use_docker }}".lower() == "y": remove_node_dockerfile() + else: + handle_js_runner( + "{{ cookiecutter.frontend_pipeline }}", + use_docker=("{{ cookiecutter.use_docker }}".lower() == "y"), + use_async=("{{ cookiecutter.use_async }}".lower() == "y"), + ) - if "{{ cookiecutter.cloud_provider}}" == "None": + if "{{ cookiecutter.cloud_provider }}" == "None": print( WARNING + "You chose not to use a cloud provider, " "media files won't be served in production." + TERMINATOR diff --git a/tests/test_bare.sh b/tests/test_bare.sh index 05da9328b..afd12fec8 100755 --- a/tests/test_bare.sh +++ b/tests/test_bare.sh @@ -32,13 +32,11 @@ pytest # Make sure the check doesn't raise any warnings python manage.py check --fail-level WARNING +# Run npm build script if package.json is present if [ -f "package.json" ] then npm install - if [ -f "gulpfile.js" ] - then - npm run build - fi + npm run build fi # Generate the HTML for the documentation diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 3a881cc64..5608bf884 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -101,6 +101,7 @@ SUPPORTED_COMBINATIONS = [ {"frontend_pipeline": "None"}, {"frontend_pipeline": "Django Compressor"}, {"frontend_pipeline": "Gulp"}, + {"frontend_pipeline": "Webpack"}, {"use_celery": "y"}, {"use_celery": "n"}, {"use_mailhog": "y"}, diff --git a/tests/test_docker.sh b/tests/test_docker.sh index b3663bd2c..28d232896 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -41,3 +41,9 @@ docker-compose -f local.yml run django python manage.py check --fail-level WARNI # Generate the HTML for the documentation docker-compose -f local.yml run docs make html + +# Run npm build script if package.json is present +if [ -f "package.json" ] +then + docker-compose -f local.yml run node npm run build +fi diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 17e9249c0..19bb2bc07 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -348,3 +348,7 @@ vendors.js *.min.js *.min.js.map {%- endif %} +{%- if cookiecutter.frontend_pipeline == 'Webpack' %} +{{ cookiecutter.project_slug }}/static/webpack_bundles/ +webpack-stats.json +{%- endif %} diff --git a/{{cookiecutter.project_slug}}/.idea/runConfigurations/docker_compose_up_django.xml b/{{cookiecutter.project_slug}}/.idea/runConfigurations/docker_compose_up_django.xml index ad3b6a35a..e84c5ffdd 100644 --- a/{{cookiecutter.project_slug}}/.idea/runConfigurations/docker_compose_up_django.xml +++ b/{{cookiecutter.project_slug}}/.idea/runConfigurations/docker_compose_up_django.xml @@ -10,7 +10,7 @@