From 932c7b6145712c42006dccfe4f4570a66faff759 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 9 Jun 2023 02:32:22 +0000 Subject: [PATCH 001/157] Release 2023.06.08 --- CHANGELOG.md | 19 +++++++++++++++++++ setup.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b56dc7c2..f572bd79e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,25 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.06.08 + + +### Fixed + +- Fix failure in user view test caused by translations ([#4374](https://github.com/cookiecutter/cookiecutter-django/pull/4374)) + +### Updated + +- Update to Python 3.11.4 in production Docker compose ([#4378](https://github.com/cookiecutter/cookiecutter-django/pull/4378)) + +- Update to Python 3.11.4 in docs Docker compose ([#4379](https://github.com/cookiecutter/cookiecutter-django/pull/4379)) + +- Update to Python 3.11.4 in local Docker compose ([#4380](https://github.com/cookiecutter/cookiecutter-django/pull/4380)) + +- Update celery to 5.3.0 ([#4369](https://github.com/cookiecutter/cookiecutter-django/pull/4369)) + +- Update werkzeug to 2.3.5 ([#4377](https://github.com/cookiecutter/cookiecutter-django/pull/4377)) + ## 2023.06.07 diff --git a/setup.py b/setup.py index f9d6222d5..f541bdee6 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.07" +version = "2023.06.08" with open("README.rst") as readme_file: long_description = readme_file.read() From 2e561ed6c4c7ed8950334eaa63eca70a32dac055 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 9 Jun 2023 11:12:44 +0100 Subject: [PATCH 002/157] Fix missing `compilemessages` step before deploying to prod (#4363) * Update readme on internationalization * Run compilemessages when building production image * Run compilemessages when deploying to Heroku * Always keep Heroku post-compile hooks * Add empty po file for en-US language * Update instructions for Docker * Update default po file * Convert locale readme to markdown and expand a bit the instructions * Don't compile translations for 3rd party packages * Use simplified settings & set env variables for compiling translations * Update README for translations * Improve metadata for Brazilian Portuguese translations * Fix condition for django compressor on Heroku * Fix condition for Django Compressor --- hooks/post_gen_project.py | 6 ---- .../bin/post_compile | 4 +++ .../compose/production/django/Dockerfile | 4 +++ .../locale/README.md | 32 +++++++++++++++++++ .../locale/README.rst | 14 -------- .../locale/en_US/LC_MESSAGES/django.po | 12 +++++++ .../locale/pt_BR/LC_MESSAGES/django.po | 16 +++------- 7 files changed, 57 insertions(+), 31 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/locale/README.md delete mode 100644 {{cookiecutter.project_slug}}/locale/README.rst create mode 100644 {{cookiecutter.project_slug}}/locale/en_US/LC_MESSAGES/django.po diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 927419f8c..11f165b78 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -96,10 +96,6 @@ def remove_heroku_files(): # don't remove the file if we are using travisci but not using heroku continue os.remove(file_name) - remove_heroku_build_hooks() - - -def remove_heroku_build_hooks(): shutil.rmtree("bin") @@ -444,8 +440,6 @@ def main(): if "{{ cookiecutter.use_heroku }}".lower() == "n": remove_heroku_files() - elif "{{ cookiecutter.frontend_pipeline }}" != "Django Compressor": - remove_heroku_build_hooks() if "{{ cookiecutter.use_docker }}".lower() == "n" and "{{ cookiecutter.use_heroku }}".lower() == "n": if "{{ cookiecutter.keep_local_envs_in_vcs }}".lower() == "y": diff --git a/{{cookiecutter.project_slug}}/bin/post_compile b/{{cookiecutter.project_slug}}/bin/post_compile index a9c94b39a..16719f493 100644 --- a/{{cookiecutter.project_slug}}/bin/post_compile +++ b/{{cookiecutter.project_slug}}/bin/post_compile @@ -1,4 +1,5 @@ #!/usr/bin/env bash +{%- if cookiecutter.frontend_pipeline == "Django Compressor" %} compress_enabled() { python << END @@ -19,4 +20,7 @@ if compress_enabled then python manage.py compress fi +{%- endif %} + python manage.py collectstatic --noinput +python manage.py compilemessages -i site-packages diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index bbe459839..5a863ddc5 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -121,4 +121,8 @@ RUN chown django:django ${APP_HOME} USER django +RUN DATABASE_URL="" \ + DJANGO_SETTINGS_MODULE="config.settings.test" \ + python manage.py compilemessages + ENTRYPOINT ["/entrypoint"] diff --git a/{{cookiecutter.project_slug}}/locale/README.md b/{{cookiecutter.project_slug}}/locale/README.md new file mode 100644 index 000000000..b2a8a0ef2 --- /dev/null +++ b/{{cookiecutter.project_slug}}/locale/README.md @@ -0,0 +1,32 @@ +# Translations + +Start by configuring the `LANGUAGES` settings in `base.py`, by uncommenting languages you are willing to support. Then, translations strings will be placed in this folder when running: + +```bash +{% if cookiecutter.use_docker == 'y' %}docker-compose -f local.yml run --rm django {% endif %}python manage.py makemessages -all --no-location +``` + +This should generate `django.po` (stands for Portable Object) files under each locale `/LC_MESSAGES/django.po`. Each translatable string in the codebase is collected with its `msgid` and need to be translated as `msgstr`, for example: + +```po +msgid "users" +msgstr "utilisateurs" +``` + +Once all translations are done, they need to be compiled into `.mo` files (stands for Machine Object), which are the actual binary files used by the application: + +```bash +{% if cookiecutter.use_docker == 'y' %}docker-compose -f local.yml run --rm django {% endif %}python manage.py compilemessages +``` + +Note that the `.po` files are NOT used by the application directly, so if the `.mo` files are out of dates, the content won't appear as translated even if the `.po` files are up-to-date. + +## Production + +The production image runs `compilemessages` automatically at build time, so as long as your translated source files (PO) are up-to-date, you're good to go. + +## Add a new language + +1. Update the [`LANGUAGES` setting](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-LANGUAGES) to your project's base settings. +2. Create the locale folder for the language next to this file, e.g. `fr_FR` for French. Make sure the case is correct. +3. Run `makemessages` (as instructed above) to generate the PO files for the new language. diff --git a/{{cookiecutter.project_slug}}/locale/README.rst b/{{cookiecutter.project_slug}}/locale/README.rst deleted file mode 100644 index a501b7a18..000000000 --- a/{{cookiecutter.project_slug}}/locale/README.rst +++ /dev/null @@ -1,14 +0,0 @@ -Translations -============ - -Start by configuring `LANGUAGES` at settings, by uncommenting languages you are willing to support. - -Translations will be placed in this folder when running: - - python manage.py makemessages --all - -Then you should edit the .po files providing proper translations and then run the following for compiling the messages: - - python manage.py compilemessages - -Note: You may need to restart the django server for changes to take effect. diff --git a/{{cookiecutter.project_slug}}/locale/en_US/LC_MESSAGES/django.po b/{{cookiecutter.project_slug}}/locale/en_US/LC_MESSAGES/django.po new file mode 100644 index 000000000..6a4aa2e0b --- /dev/null +++ b/{{cookiecutter.project_slug}}/locale/en_US/LC_MESSAGES/django.po @@ -0,0 +1,12 @@ +# Translations for the {{ cookiecutter.project_name }} project +# Copyright (C) {% now 'utc', '%Y' %} {{ cookiecutter.author_name }} +# {{ cookiecutter.author_name }} <{{ cookiecutter.email }}>, {% now 'utc', '%Y' %}. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: {{ cookiecutter.version }}\n" +"Language: en-US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" diff --git a/{{cookiecutter.project_slug}}/locale/pt_BR/LC_MESSAGES/django.po b/{{cookiecutter.project_slug}}/locale/pt_BR/LC_MESSAGES/django.po index fc17c6a61..2556abba8 100644 --- a/{{cookiecutter.project_slug}}/locale/pt_BR/LC_MESSAGES/django.po +++ b/{{cookiecutter.project_slug}}/locale/pt_BR/LC_MESSAGES/django.po @@ -1,18 +1,12 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. +# Translations for the {{ cookiecutter.project_name }} project +# Copyright (C) {% now 'utc', '%Y' %} {{ cookiecutter.author_name }} +# {{ cookiecutter.author_name }} <{{ cookiecutter.email }}>, {% now 'utc', '%Y' %}. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-04 21:42+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"Project-Id-Version: {{ cookiecutter.version }}\n" +"Language: pt-BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" From f643dffa733dbb114eeda42aa02c375f8b0dd9bb Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 10 Jun 2023 02:27:27 +0000 Subject: [PATCH 003/157] Release 2023.06.09 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f572bd79e..a32895aa7 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.06.09 + + +### Fixed + +- Fix missing `compilemessages` step before deploying to prod ([#4363](https://github.com/cookiecutter/cookiecutter-django/pull/4363)) + ## 2023.06.08 diff --git a/setup.py b/setup.py index f541bdee6..9271e944e 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.08" +version = "2023.06.09" with open("README.rst") as readme_file: long_description = readme_file.read() From 9bb27586d5cefac5d06d3fcddc63ea2f4f3c8065 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 11 Jun 2023 09:15:29 +0100 Subject: [PATCH 004/157] Auto-update pre-commit hooks (#4385) 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 2c7876d3c..98afc14e0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: args: ["--tab-width", "2"] - repo: https://github.com/asottile/pyupgrade - rev: v3.4.0 + rev: v3.6.0 hooks: - id: pyupgrade args: [--py311-plus] diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 3a0411d81..91a50b97d 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: args: ['--target-version', '4.1'] - repo: https://github.com/asottile/pyupgrade - rev: v3.4.0 + rev: v3.6.0 hooks: - id: pyupgrade args: [--py311-plus] From 733f5b95442be0a164fc20cda474dc3683a8ec2a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 11 Jun 2023 03:16:04 -0500 Subject: [PATCH 005/157] Update pytest to 7.3.2 (#4384) * Update pytest from 7.3.1 to 7.3.2 * Update pytest from 7.3.1 to 7.3.2 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index f964e4ac7..61faaa59e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ pre-commit==3.3.2 # Testing # ------------------------------------------------------------------------------ tox==4.6.0 -pytest==7.3.1 +pytest==7.3.2 pytest-xdist==3.3.1 pytest-cookies==0.7.0 pytest-instafail==0.5.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 3e8b13133..2c72a0866 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -15,7 +15,7 @@ watchfiles==0.19.0 # https://github.com/samuelcolvin/watchfiles # ------------------------------------------------------------------------------ mypy==1.3.0 # https://github.com/python/mypy django-stubs==4.2.1 # https://github.com/typeddjango/django-stubs -pytest==7.3.1 # https://github.com/pytest-dev/pytest +pytest==7.3.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} djangorestframework-stubs==3.14.1 # https://github.com/typeddjango/djangorestframework-stubs From 554edd43b14a45b6b9767ad3b58c5b909807272e Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 12 Jun 2023 02:31:28 +0000 Subject: [PATCH 006/157] Release 2023.06.11 --- CHANGELOG.md | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a32895aa7..60c1ce384 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.06.11 + + +### Updated + +- Update pytest to 7.3.2 ([#4384](https://github.com/cookiecutter/cookiecutter-django/pull/4384)) + +- Auto-update pre-commit hooks ([#4385](https://github.com/cookiecutter/cookiecutter-django/pull/4385)) + ## 2023.06.09 diff --git a/setup.py b/setup.py index 9271e944e..cc429c0e0 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.09" +version = "2023.06.11" with open("README.rst") as readme_file: long_description = readme_file.read() From fa096673e4909528528ed7a63678a9ea2244be22 Mon Sep 17 00:00:00 2001 From: Jelmer Draaijer Date: Tue, 13 Jun 2023 21:08:21 +0200 Subject: [PATCH 007/157] Add @foarsitter as core contributor --- .github/contributors.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/contributors.json b/.github/contributors.json index 13c4eafd3..b6eb7d639 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -53,6 +53,12 @@ "twitter_username": "sfdye", "is_core": true }, + { + "name": "Jelmer Draaijer", + "github_login": "foarsitter", + "twitter_username": "", + "is_core": true + }, { "name": "18", "github_login": "dezoito", @@ -553,11 +559,6 @@ "github_login": "jvanbrug", "twitter_username": "" }, - { - "name": "Jelmer Draaijer", - "github_login": "foarsitter", - "twitter_username": "" - }, { "name": "Jerome Caisip", "github_login": "jeromecaisip", @@ -1398,4 +1399,4 @@ "github_login": "matheusjardimb", "twitter_username": "" } -] \ No newline at end of file +] From dc61beecba271019ad72f28096c8e4b9db5ba2a4 Mon Sep 17 00:00:00 2001 From: foarsitter Date: Tue, 13 Jun 2023 20:06:25 +0000 Subject: [PATCH 008/157] Update Contributors --- .github/contributors.json | 2 +- CONTRIBUTORS.md | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/contributors.json b/.github/contributors.json index b6eb7d639..f5d7a4df6 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1399,4 +1399,4 @@ "github_login": "matheusjardimb", "twitter_username": "" } -] +] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4e2f1fb31..52072d8e2 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -74,6 +74,13 @@ accept and merge pull requests. sfdye + + Jelmer Draaijer + + foarsitter + + + _Audrey is also the creator of Cookiecutter. Audrey and Daniel are on @@ -1006,13 +1013,6 @@ Listed in alphabetical order. - - Jelmer Draaijer - - foarsitter - - - Jens Nilsson From 0d308fa2eeaa7bb1b4c1e9387af6e838e0c8e083 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 14 Jun 2023 00:54:36 -0500 Subject: [PATCH 009/157] Update pre-commit to 3.3.3 (#4390) * Update pre-commit from 3.3.2 to 3.3.3 * Update pre-commit from 3.3.2 to 3.3.3 --- 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 61faaa59e..3f33db7db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ black==23.3.0 isort==5.12.0 flake8==6.0.0 django-upgrade==1.13.0 -pre-commit==3.3.2 +pre-commit==3.3.3 # Testing # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 2c72a0866..983f96cb9 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.3.2 # https://github.com/pre-commit/pre-commit +pre-commit==3.3.3 # https://github.com/pre-commit/pre-commit # Django # ------------------------------------------------------------------------------ From 1c399167adf90b28589a88018dd8f33c06fdb49b Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 14 Jun 2023 13:54:22 +0100 Subject: [PATCH 010/157] Update django-webpack-loader from 2.0.0 to 2.0.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 9b2159edf..293defde1 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -46,5 +46,5 @@ django-cors-headers==4.0.0 # https://github.com/adamchainz/django-cors-headers drf-spectacular==0.26.2 # https://github.com/tfranzel/drf-spectacular {%- endif %} {%- if cookiecutter.frontend_pipeline == 'Webpack' %} -django-webpack-loader==2.0.0 # https://github.com/django-webpack/django-webpack-loader +django-webpack-loader==2.0.1 # https://github.com/django-webpack/django-webpack-loader {%- endif %} From c15eb6d97a4995478c3a4b2db2498d7ffaed1a17 Mon Sep 17 00:00:00 2001 From: Jelmer Draaijer Date: Thu, 6 Apr 2023 16:31:30 +0200 Subject: [PATCH 011/157] Upgrade to django 4.2 --- README.md | 2 +- setup.py | 2 +- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d718ee34c..42f5047e6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ production-ready Django projects quickly. ## Features -- For Django 4.1 +- For Django 4.2 - Works with Python 3.11 - Renders Django projects with 100% starting test coverage - Twitter [Bootstrap](https://github.com/twbs/bootstrap) v5 diff --git a/setup.py b/setup.py index cc429c0e0..a6fd4d67a 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup( classifiers=[ "Development Status :: 4 - Beta", "Environment :: Console", - "Framework :: Django :: 4.1", + "Framework :: Django :: 4.2", "Intended Audience :: Developers", "Natural Language :: English", "License :: OSI Approved :: BSD License", diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 293defde1..5b38805af 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -28,7 +28,7 @@ uvicorn[standard]==0.22.0 # https://github.com/encode/uvicorn # Django # ------------------------------------------------------------------------------ -django==4.1.9 # pyup: < 4.2 # https://www.djangoproject.com/ +django==4.2.2 # pyup: < 5.0 # https://www.djangoproject.com/ django-environ==0.10.0 # https://github.com/joke2k/django-environ django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils django-allauth==0.54.0 # https://github.com/pennersr/django-allauth From da308877951e1697d3e4267bae06675eaf1989c2 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 14 Jun 2023 12:27:57 -0500 Subject: [PATCH 012/157] Update django-upgrade from 1.13.0 to 1.14.0 (#4394) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3f33db7db..0b59babfd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ binaryornot==0.4.4 black==23.3.0 isort==5.12.0 flake8==6.0.0 -django-upgrade==1.13.0 +django-upgrade==1.14.0 pre-commit==3.3.3 # Testing From 61ee4c3e30cfd70f53af89f1df18af037a4a9f8a Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 14 Jun 2023 14:49:07 -0500 Subject: [PATCH 013/157] Update django-cors-headers from 4.0.0 to 4.1.0 (#4391) --- {{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 293defde1..7d733ed7f 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -41,7 +41,7 @@ django-redis==5.2.0 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == 'y' %} # Django REST Framework djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework -django-cors-headers==4.0.0 # https://github.com/adamchainz/django-cors-headers +django-cors-headers==4.1.0 # https://github.com/adamchainz/django-cors-headers # DRF-spectacular for api documentation drf-spectacular==0.26.2 # https://github.com/tfranzel/drf-spectacular {%- endif %} From 6d9cfeb0997ac3a4c3d9f8f5cad9a03d68fb2ac9 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 15 Jun 2023 02:24:08 +0000 Subject: [PATCH 014/157] Release 2023.06.14 --- CHANGELOG.md | 13 +++++++++++++ setup.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60c1ce384..ad0e5acc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,19 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.06.14 + + +### Updated + +- Update django-cors-headers to 4.1.0 ([#4391](https://github.com/cookiecutter/cookiecutter-django/pull/4391)) + +- Update django-upgrade to 1.14.0 ([#4394](https://github.com/cookiecutter/cookiecutter-django/pull/4394)) + +- Update django-webpack-loader to 2.0.1 ([#4392](https://github.com/cookiecutter/cookiecutter-django/pull/4392)) + +- Update pre-commit to 3.3.3 ([#4390](https://github.com/cookiecutter/cookiecutter-django/pull/4390)) + ## 2023.06.11 diff --git a/setup.py b/setup.py index cc429c0e0..e6ad617c9 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.11" +version = "2023.06.14" with open("README.rst") as readme_file: long_description = readme_file.read() From 8c93ad4dd0cf24253e9e30256cd1d8118fdccc15 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 16 Jun 2023 07:41:56 +0100 Subject: [PATCH 015/157] Auto-update pre-commit hooks (#4395) Co-authored-by: browniebroke --- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 91a50b97d..99b08271c 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: exclude: '{{cookiecutter.project_slug}}/templates/' - repo: https://github.com/adamchainz/django-upgrade - rev: '1.13.0' + rev: '1.14.0' hooks: - id: django-upgrade args: ['--target-version', '4.1'] From d6b46df30a52f02faf35aa90f2812fc3f80ef958 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 16 Jun 2023 01:43:17 -0500 Subject: [PATCH 016/157] Update tox from 4.6.0 to 4.6.1 (#4398) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0b59babfd..e9253922d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==3.3.3 # Testing # ------------------------------------------------------------------------------ -tox==4.6.0 +tox==4.6.1 pytest==7.3.2 pytest-xdist==3.3.1 pytest-cookies==0.7.0 From 9b3c4e7a94f3c3657127ac9f67f9314a531622ad Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 16 Jun 2023 14:55:01 +0100 Subject: [PATCH 017/157] Update django-redis from 5.2.0 to 5.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 7d733ed7f..22130752f 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -37,7 +37,7 @@ crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstra {%- if cookiecutter.frontend_pipeline == '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 +django-redis==5.3.0 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == 'y' %} # Django REST Framework djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework From 9c8913ef4790d46c4b659137d65840f2ffcbb871 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 16 Jun 2023 15:10:09 -0500 Subject: [PATCH 018/157] Update whitenoise from 6.4.0 to 6.5.0 (#4400) --- {{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 22130752f..92d6b2a0d 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -9,7 +9,7 @@ rcssmin==1.1.1 # https://github.com/ndparker/rcssmin {%- endif %} argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} -whitenoise==6.4.0 # https://github.com/evansd/whitenoise +whitenoise==6.5.0 # https://github.com/evansd/whitenoise {%- endif %} redis==4.5.5 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} From fc96e3859161635807b9a874925ff1543dffce0d Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 17 Jun 2023 02:21:32 +0000 Subject: [PATCH 019/157] Release 2023.06.16 --- CHANGELOG.md | 11 +++++++++++ setup.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad0e5acc5..a90c1fecd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.06.16 + + +### Updated + +- Update whitenoise to 6.5.0 ([#4400](https://github.com/cookiecutter/cookiecutter-django/pull/4400)) + +- Update django-redis to 5.3.0 ([#4399](https://github.com/cookiecutter/cookiecutter-django/pull/4399)) + +- Auto-update pre-commit hooks ([#4395](https://github.com/cookiecutter/cookiecutter-django/pull/4395)) + ## 2023.06.14 diff --git a/setup.py b/setup.py index e6ad617c9..717d19913 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.14" +version = "2023.06.16" with open("README.rst") as readme_file: long_description = readme_file.read() From ba9d73ce2139d9755f504e8452c7d34fcfad7ff9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 17 Jun 2023 13:38:53 -0500 Subject: [PATCH 020/157] Update myst-parser from 1.0.0 to 2.0.0 (#4388) --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 1ae530fa7..d06b651b3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,3 @@ sphinx==6.2.1 sphinx-rtd-theme==1.2.2 -myst-parser==1.0.0 +myst-parser==2.0.0 From 0b92189b61a51dbaaf990c7cc547bd52b156c7eb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 17 Jun 2023 13:39:30 -0500 Subject: [PATCH 021/157] Update tox from 4.6.1 to 4.6.2 (#4401) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e9253922d..95b3d8cdc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==3.3.3 # Testing # ------------------------------------------------------------------------------ -tox==4.6.1 +tox==4.6.2 pytest==7.3.2 pytest-xdist==3.3.1 pytest-cookies==0.7.0 From 1e40d7908fcc5e3e276db37e0e1f630f7fba2b78 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 18 Jun 2023 02:31:49 +0000 Subject: [PATCH 022/157] Release 2023.06.17 --- CHANGELOG.md | 3 +++ setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a90c1fecd..1ed82b9a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.06.17 + + ## 2023.06.16 diff --git a/setup.py b/setup.py index 717d19913..f03a87a09 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.16" +version = "2023.06.17" with open("README.rst") as readme_file: long_description = readme_file.read() From 7ad2e1fdae82e011fa823f5f42590bf6ce3638ee Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sun, 18 Jun 2023 13:03:36 +0100 Subject: [PATCH 023/157] Fix missing celery env variable when running compilemessages (#4403) --- .../compose/production/django/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 5a863ddc5..a48cbc4af 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -122,6 +122,9 @@ RUN chown django:django ${APP_HOME} USER django RUN DATABASE_URL="" \ + {%- if cookiecutter.use_celery == "y" %} + CELERY_BROKER_URL="" \ + {%- endif %} DJANGO_SETTINGS_MODULE="config.settings.test" \ python manage.py compilemessages From 224f31e7f34ab9daaa8e8394e9c6823e7657fd58 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sun, 18 Jun 2023 07:32:36 -0500 Subject: [PATCH 024/157] Update flower from 1.2.0 to 2.0.0 (#4402) --- {{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 92d6b2a0d..6a9b57013 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -19,7 +19,7 @@ hiredis==2.2.3 # https://github.com/redis/hiredis-py celery==5.3.0 # pyup: < 6.0 # https://github.com/celery/celery django-celery-beat==2.5.0 # https://github.com/celery/django-celery-beat {%- if cookiecutter.use_docker == 'y' %} -flower==1.2.0 # https://github.com/mher/flower +flower==2.0.0 # https://github.com/mher/flower {%- endif %} {%- endif %} {%- if cookiecutter.use_async == 'y' %} From 95353f07a975a201cd90088ad1b1905611b94d11 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 19 Jun 2023 02:26:21 +0000 Subject: [PATCH 025/157] Release 2023.06.18 --- CHANGELOG.md | 11 +++++++++++ setup.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ed82b9a1..6eabf5799 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.06.18 + + +### Changed + +- Fix missing celery env variable when running compilemessages ([#4403](https://github.com/cookiecutter/cookiecutter-django/pull/4403)) + +### Updated + +- Update flower to 2.0.0 ([#4402](https://github.com/cookiecutter/cookiecutter-django/pull/4402)) + ## 2023.06.17 diff --git a/setup.py b/setup.py index f03a87a09..335b1cc66 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.17" +version = "2023.06.18" with open("README.rst") as readme_file: long_description = readme_file.read() From 2bff4b8a8376cece7268af0635f100fc0c71c9c0 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 19 Jun 2023 04:11:17 -0500 Subject: [PATCH 026/157] Update celery to 5.3.1 (#4404) --- {{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 6a9b57013..5e7f7d28d 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -16,7 +16,7 @@ redis==4.5.5 # https://github.com/redis/redis-py hiredis==2.2.3 # https://github.com/redis/hiredis-py {%- endif %} {%- if cookiecutter.use_celery == "y" %} -celery==5.3.0 # pyup: < 6.0 # https://github.com/celery/celery +celery==5.3.1 # pyup: < 6.0 # https://github.com/celery/celery django-celery-beat==2.5.0 # https://github.com/celery/django-celery-beat {%- if cookiecutter.use_docker == 'y' %} flower==2.0.0 # https://github.com/mher/flower From 5de0e05490cd28cf517d71b5f19c9aa0afb8889b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 10:11:35 +0100 Subject: [PATCH 027/157] Auto-update pre-commit hooks (#4405) 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 98afc14e0..b35eae073 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: args: ["--tab-width", "2"] - repo: https://github.com/asottile/pyupgrade - rev: v3.6.0 + rev: v3.7.0 hooks: - id: pyupgrade args: [--py311-plus] diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 99b08271c..f16a87fd2 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: args: ['--target-version', '4.1'] - repo: https://github.com/asottile/pyupgrade - rev: v3.6.0 + rev: v3.7.0 hooks: - id: pyupgrade args: [--py311-plus] From 399a080c5b708ba72cb53eefa6a270c7a4de5218 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 20 Jun 2023 02:21:32 +0000 Subject: [PATCH 028/157] Release 2023.06.19 --- CHANGELOG.md | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eabf5799..d35d947ac 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.06.19 + + +### Updated + +- Auto-update pre-commit hooks ([#4405](https://github.com/cookiecutter/cookiecutter-django/pull/4405)) + +- Update celery to 5.3.1 ([#4404](https://github.com/cookiecutter/cookiecutter-django/pull/4404)) + ## 2023.06.18 diff --git a/setup.py b/setup.py index 335b1cc66..64027dad9 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.18" +version = "2023.06.19" with open("README.rst") as readme_file: long_description = readme_file.read() From b4c705f16e1e0c2cd7e070a731e2c900a3e5247a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 10:36:44 +0100 Subject: [PATCH 029/157] Upgrade traefik to 2.10.3 (#4408) Bumps traefik from 2.10.1 to 2.10.3. --- updated-dependencies: - dependency-name: traefik dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../compose/production/traefik/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile index 581bbfebd..bdedff720 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile @@ -1,4 +1,4 @@ -FROM traefik:2.10.1 +FROM traefik:2.10.3 RUN mkdir -p /etc/traefik/acme \ && touch /etc/traefik/acme/acme.json \ && chmod 600 /etc/traefik/acme/acme.json From 91cc9e2f3a654b1fee051a24030aa42d907923bb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 21 Jun 2023 04:37:05 -0500 Subject: [PATCH 030/157] Update tox to 4.6.3 (#4407) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 95b3d8cdc..084f870f4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==3.3.3 # Testing # ------------------------------------------------------------------------------ -tox==4.6.2 +tox==4.6.3 pytest==7.3.2 pytest-xdist==3.3.1 pytest-cookies==0.7.0 From c2afdae77a958eb34ea0113304a3969376149562 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 22 Jun 2023 02:26:04 +0000 Subject: [PATCH 031/157] Release 2023.06.21 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d35d947ac..7d563b1a9 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.06.21 + + +### Updated + +- Upgrade traefik to 2.10.3 ([#4408](https://github.com/cookiecutter/cookiecutter-django/pull/4408)) + ## 2023.06.19 diff --git a/setup.py b/setup.py index 64027dad9..3d6c87f92 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.19" +version = "2023.06.21" with open("README.rst") as readme_file: long_description = readme_file.read() From 9f9a88670855490d7026e998f7d9443efbb50467 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 22 Jun 2023 10:28:21 -0500 Subject: [PATCH 032/157] Update sentry-sdk from 1.25.1 to 1.26.0 (#4409) --- {{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 aec79b3d3..36f6e74f5 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.9.6 # https://github.com/psycopg/psycopg2 Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.25.1 # https://github.com/getsentry/sentry-python +sentry-sdk==1.26.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py From a99e28702403bd04e2c44cf760d880a719266c28 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 22 Jun 2023 14:24:23 -0500 Subject: [PATCH 033/157] Update drf-spectacular from 0.26.2 to 0.26.3 (#4411) --- {{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 5e7f7d28d..a032f404d 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -43,7 +43,7 @@ django-redis==5.3.0 # https://github.com/jazzband/django-redis djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework django-cors-headers==4.1.0 # https://github.com/adamchainz/django-cors-headers # DRF-spectacular for api documentation -drf-spectacular==0.26.2 # https://github.com/tfranzel/drf-spectacular +drf-spectacular==0.26.3 # https://github.com/tfranzel/drf-spectacular {%- endif %} {%- if cookiecutter.frontend_pipeline == 'Webpack' %} django-webpack-loader==2.0.1 # https://github.com/django-webpack/django-webpack-loader From 2c5342c36d8a917c229249e6c5668e49a0855f62 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 22 Jun 2023 14:24:38 -0500 Subject: [PATCH 034/157] Update pygithub from 1.58.2 to 1.59.0 (#4410) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 084f870f4..15497ac2e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,7 @@ pyyaml==6.0 # Scripting # ------------------------------------------------------------------------------ -PyGithub==1.58.2 +PyGithub==1.59.0 gitpython==3.1.31 jinja2==3.1.2 requests==2.31.0 From d45ecc53f11f540a9f15e63722878957ace31607 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 23 Jun 2023 02:32:39 +0000 Subject: [PATCH 035/157] Release 2023.06.22 --- CHANGELOG.md | 11 +++++++++++ setup.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d563b1a9..56fa84c30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.06.22 + + +### Updated + +- Update pygithub to 1.59.0 ([#4410](https://github.com/cookiecutter/cookiecutter-django/pull/4410)) + +- Update drf-spectacular to 0.26.3 ([#4411](https://github.com/cookiecutter/cookiecutter-django/pull/4411)) + +- Update sentry-sdk to 1.26.0 ([#4409](https://github.com/cookiecutter/cookiecutter-django/pull/4409)) + ## 2023.06.21 diff --git a/setup.py b/setup.py index 3d6c87f92..9ab3a64bb 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.21" +version = "2023.06.22" with open("README.rst") as readme_file: long_description = readme_file.read() From 2b9c56cf3995ae1695a1b084a19de0c4b21e192a Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 23 Jun 2023 10:21:53 +0100 Subject: [PATCH 036/157] Add open-collective to funding file --- .github/FUNDING.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 53a486671..23ca7a37f 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -2,11 +2,4 @@ github: [pydanny, browniebroke] patreon: feldroy -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: ["https://www.patreon.com/browniebroke"] +open_collective: cookiecutter-django From d4824e1934cdf1f4d923e490b2e7119371bf1baa Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 23 Jun 2023 10:35:44 +0100 Subject: [PATCH 037/157] Link to OpenCollective in README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d718ee34c..bab5aa041 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,11 @@ _These features can be enabled during initial project setup._ ## Support this Project! -This project is run by volunteers. Please support them in their efforts to maintain and improve Cookiecutter Django: +This project is an open source project run by volunteers. You can sponsor us via [OpenCollective](https://opencollective.com/cookiecutter-django) or individually via GitHub Sponsors: - Daniel Roy Greenfeld, Project Lead ([GitHub](https://github.com/pydanny), [Patreon](https://www.patreon.com/danielroygreenfeld)): expertise in Django and AWS ELB. - Fabio C. Barrionuevo, Core Developer ([GitHub](https://github.com/luzfcb)): expertise in Python/Django, hands-on DevOps and frontend experience. +- Bruno Alla, Core Developer ([GitHub](https://github.com/browniebroke)): expertise in Python/Django and DevOps. - Nikita Shupeyko, Core Developer ([GitHub](https://github.com/webyneter)): expertise in Python/Django, hands-on DevOps and frontend experience. Projects that provide financial support to the maintainers: From a126dfb96f0143adf3c9cc644f7f79a2c3186476 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 23 Jun 2023 18:48:31 +0100 Subject: [PATCH 038/157] Update pytest from 7.3.2 to 7.4.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 15497ac2e..c547458b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ pre-commit==3.3.3 # Testing # ------------------------------------------------------------------------------ tox==4.6.3 -pytest==7.3.2 +pytest==7.4.0 pytest-xdist==3.3.1 pytest-cookies==0.7.0 pytest-instafail==0.5.0 From b2642ac37d12eaa8e94c15214233d51a329e4cdb Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 23 Jun 2023 18:48:31 +0100 Subject: [PATCH 039/157] Update pytest from 7.3.2 to 7.4.0 --- {{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 983f96cb9..b3a3e7c74 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -15,7 +15,7 @@ watchfiles==0.19.0 # https://github.com/samuelcolvin/watchfiles # ------------------------------------------------------------------------------ mypy==1.3.0 # https://github.com/python/mypy django-stubs==4.2.1 # https://github.com/typeddjango/django-stubs -pytest==7.3.2 # https://github.com/pytest-dev/pytest +pytest==7.4.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} djangorestframework-stubs==3.14.1 # https://github.com/typeddjango/djangorestframework-stubs From f0357e2ad04628bb99e8a41d4eadd47eb443d4dc Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 25 Jun 2023 16:38:42 +0100 Subject: [PATCH 040/157] Update redis from 4.5.5 to 4.6.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 a032f404d..d23da8c61 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -11,7 +11,7 @@ argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==6.5.0 # https://github.com/evansd/whitenoise {%- endif %} -redis==4.5.5 # https://github.com/redis/redis-py +redis==4.6.0 # https://github.com/redis/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py {%- endif %} From da6fadd99ea1a6da02d9130727a5e530a38caf2f Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 26 Jun 2023 02:35:34 +0100 Subject: [PATCH 041/157] Update mypy from 1.3.0 to 1.4.1 --- {{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 983f96cb9..b3f53a140 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,7 +13,7 @@ watchfiles==0.19.0 # https://github.com/samuelcolvin/watchfiles # Testing # ------------------------------------------------------------------------------ -mypy==1.3.0 # https://github.com/python/mypy +mypy==1.4.1 # https://github.com/python/mypy django-stubs==4.2.1 # https://github.com/typeddjango/django-stubs pytest==7.3.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar From 541ef05fc80706291ed1f4c0ca559ab73358eb97 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 27 Jun 2023 02:33:15 +0000 Subject: [PATCH 042/157] Release 2023.06.26 --- CHANGELOG.md | 11 +++++++++++ setup.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56fa84c30..309f62a26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.06.26 + + +### Updated + +- Update pytest to 7.4.0 ([#4412](https://github.com/cookiecutter/cookiecutter-django/pull/4412)) + +- Update redis to 4.6.0 ([#4415](https://github.com/cookiecutter/cookiecutter-django/pull/4415)) + +- Update mypy to 1.4.1 ([#4416](https://github.com/cookiecutter/cookiecutter-django/pull/4416)) + ## 2023.06.22 diff --git a/setup.py b/setup.py index 9ab3a64bb..bf58e0239 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.22" +version = "2023.06.26" with open("README.rst") as readme_file: long_description = readme_file.read() From be6d71644b38d5f390f87de6a51bae8922b8f9db Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Tue, 27 Jun 2023 16:38:42 -0400 Subject: [PATCH 043/157] Change psycopg2 to psycopg3 --- {{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 543b86b70..d2ff15456 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -3,7 +3,7 @@ Werkzeug[watchdog]==2.3.5 # https://github.com/pallets/werkzeug ipdb==0.13.13 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} -psycopg2==2.9.6 # https://github.com/psycopg/psycopg2 +psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg {%- else %} psycopg2-binary==2.9.6 # https://github.com/psycopg/psycopg2 {%- endif %} From b03cde122171d480bbb5e3c6761bb4b2b8a93d45 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Tue, 27 Jun 2023 16:40:03 -0400 Subject: [PATCH 044/157] Update production.txt --- {{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 36f6e74f5..a45ff8e77 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -3,7 +3,7 @@ -r base.txt gunicorn==20.1.0 # https://github.com/benoitc/gunicorn -psycopg2==2.9.6 # https://github.com/psycopg/psycopg2 +psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} From dda67d449b2c47258bffc64f8a4917ee8afd1d5d Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Tue, 27 Jun 2023 16:40:43 -0400 Subject: [PATCH 045/157] Update local.txt --- {{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 d2ff15456..f180a6cad 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -5,7 +5,7 @@ ipdb==0.13.13 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg {%- else %} -psycopg2-binary==2.9.6 # https://github.com/psycopg/psycopg2 +psycopg[binary]==3.1.9 # https://github.com/psycopg/psycopg {%- endif %} {%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %} watchfiles==0.19.0 # https://github.com/samuelcolvin/watchfiles From 30e85068727dc7d609f410804614a43c463cca0c Mon Sep 17 00:00:00 2001 From: monosans Date: Tue, 27 Jun 2023 21:52:36 +0000 Subject: [PATCH 046/157] Add djLint for HTML formatting and linting (#4389) * Add djLint for HTML formatting and linting * Remove djLint pre-commit hook * Bump djLint from 1.31.0 to 1.31.1 --- pyproject.toml | 21 ++ requirements.txt | 1 + tests/test_cookiecutter_generation.py | 26 ++ .../.pre-commit-config.yaml | 6 + {{cookiecutter.project_slug}}/pyproject.toml | 20 ++ .../requirements/local.txt | 1 + .../templates/403.html | 14 +- .../templates/404.html | 14 +- .../templates/500.html | 13 +- .../templates/account/account_inactive.html | 12 +- .../templates/account/base.html | 15 +- .../templates/account/email.html | 135 ++++---- .../templates/account/email_confirm.html | 46 ++- .../templates/account/login.html | 91 +++--- .../templates/account/logout.html | 29 +- .../templates/account/password_change.html | 22 +- .../templates/account/password_reset.html | 37 ++- .../account/password_reset_done.html | 19 +- .../account/password_reset_from_key.html | 42 ++- .../account/password_reset_from_key_done.html | 10 +- .../templates/account/password_set.html | 25 +- .../templates/account/signup.html | 37 ++- .../templates/account/signup_closed.html | 12 +- .../templates/account/verification_sent.html | 15 +- .../account/verified_email_required.html | 31 +- .../templates/base.html | 294 ++++++++++-------- .../templates/pages/about.html | 4 +- .../templates/pages/home.html | 4 +- .../templates/users/user_detail.html | 62 ++-- .../templates/users/user_form.html | 42 ++- 30 files changed, 643 insertions(+), 457 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2b4b98783..2a9f00b29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,3 +27,24 @@ known_first_party = [ "scripts", "hooks", ] + + +# ==== djLint ==== +[tool.djlint] +blank_line_after_tag = "load,extends" +close_void_tags = true +format_css = true +format_js = true +# TODO: remove T002 when fixed https://github.com/Riverside-Healthcare/djLint/issues/687 +ignore = "H006,H030,H031,T002,T028" +ignore_blocks = "raw" +include = "H017,H035" +indent = 2 +max_line_length = 119 +profile = "jinja" + +[tool.djlint.css] +indent_size = 2 + +[tool.djlint.js] +indent_size = 2 diff --git a/requirements.txt b/requirements.txt index c547458b6..d6d0ca754 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ black==23.3.0 isort==5.12.0 flake8==6.0.0 django-upgrade==1.14.0 +djlint==1.31.1 pre-commit==3.3.3 # Testing diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 778e3411f..bb91e329a 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -239,6 +239,32 @@ def test_django_upgrade_passes(cookies, context_override): pytest.fail(e.stdout.decode()) +@pytest.mark.parametrize("context_override", SUPPORTED_COMBINATIONS, ids=_fixture_id) +def test_djlint_lint_passes(cookies, context_override): + """Check whether generated project passes djLint --lint.""" + result = cookies.bake(extra_context=context_override) + + autofixable_rules = "H014,T001" + # TODO: remove T002 when fixed https://github.com/Riverside-Healthcare/djLint/issues/687 + ignored_rules = "H006,H030,H031,T002" + try: + sh.djlint("--lint", "--ignore", f"{autofixable_rules},{ignored_rules}", ".", _cwd=str(result.project_path)) + except sh.ErrorReturnCode as e: + pytest.fail(e.stdout.decode()) + + +@auto_fixable +@pytest.mark.parametrize("context_override", SUPPORTED_COMBINATIONS, ids=_fixture_id) +def test_djlint_check_passes(cookies, context_override): + """Check whether generated project passes djLint --check.""" + result = cookies.bake(extra_context=context_override) + + try: + sh.djlint("--check", ".", _cwd=str(result.project_path)) + except sh.ErrorReturnCode as e: + pytest.fail(e.stdout.decode()) + + @pytest.mark.parametrize( ["use_docker", "expected_test_script"], [ diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index f16a87fd2..f400001f1 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -51,6 +51,12 @@ repos: hooks: - id: flake8 + - repo: https://github.com/Riverside-Healthcare/djLint + rev: v1.31.1 + hooks: + - id: djlint-reformat-django + - id: djlint-django + # sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date ci: autoupdate_schedule: weekly diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 6acac9b2c..7e4c9aa9c 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -90,3 +90,23 @@ generated-members = [ "save", "delete", ] + + +# ==== djLint ==== +[tool.djlint] +blank_line_after_tag = "load,extends" +close_void_tags = true +format_css = true +format_js = true +# TODO: remove T002 when fixed https://github.com/Riverside-Healthcare/djLint/issues/687 +ignore = "H006,H030,H031,T002" +include = "H017,H035" +indent = 2 +max_line_length = 119 +profile = "django" + +[tool.djlint.css] +indent_size = 2 + +[tool.djlint.js] +indent_size = 2 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 543b86b70..bf4e8a49d 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -32,6 +32,7 @@ flake8==6.0.0 # https://github.com/PyCQA/flake8 flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort coverage==7.2.7 # https://github.com/nedbat/coveragepy black==23.3.0 # https://github.com/psf/black +djlint==1.31.1 # https://github.com/Riverside-Healthcare/djLint pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html index 4c4745f7d..d90b33f9b 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html @@ -1,10 +1,14 @@ {% raw %}{% extends "base.html" %} -{% block title %}Forbidden (403){% endblock %} - +{% block title %}Forbidden (403){% endblock title %} {% block content %} -

Forbidden (403)

- -

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

+

Forbidden (403)

+

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

{% endblock content %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/404.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/404.html index d98241858..621596412 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/404.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/404.html @@ -1,10 +1,14 @@ {% raw %}{% extends "base.html" %} -{% block title %}Page not found{% endblock %} - +{% block title %}Page not found{% endblock title %} {% block content %} -

Page not found

- -

{% if exception %}{{ exception }}{% else %}This is not the page you were looking for.{% endif %}

+

Page not found

+

+ {% if exception %} + {{ exception }} + {% else %} + This is not the page you were looking for. + {% endif %} +

{% endblock content %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/500.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/500.html index 481bb2d0b..890320164 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/500.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/500.html @@ -1,12 +1,11 @@ {% raw %}{% extends "base.html" %} -{% block title %}Server Error{% endblock %} - +{% block title %}Server Error{% endblock title %} {% block content %} -

Ooops!!! 500

- -

Looks like something went wrong!

- -

We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.

+

Ooops!!! 500

+

Looks like something went wrong!

+

+ We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing. +

{% endblock content %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/account_inactive.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/account_inactive.html index ab910820e..a9112cf09 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/account_inactive.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/account_inactive.html @@ -2,11 +2,11 @@ {% load i18n %} -{% block head_title %}{% translate "Account Inactive" %}{% endblock %} - +{% block head_title %} + {% translate "Account Inactive" %} +{% endblock head_title %} {% block inner %} -

{% translate "Account Inactive" %}

- -

{% translate "This account is inactive." %}

-{% endblock %} +

{% translate "Account Inactive" %}

+

{% translate "This account is inactive." %}

+{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/base.html index 03c86724b..057618257 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/base.html @@ -1,11 +1,14 @@ {% raw %}{% extends "base.html" %} -{% block title %}{% block head_title %}{% endblock head_title %}{% endblock title %} +{% block title %} + {% block head_title %} + {% endblock head_title %} +{% endblock title %} {% block content %} -
-
- {% block inner %}{% endblock %} +
+
+ {% block inner %}{% endblock inner %} +
-
-{% endblock %} +{% endblock content %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html index 1faa2b9fd..37770f00c 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html @@ -4,76 +4,77 @@ {% load i18n %} {% load crispy_forms_tags %} -{% block head_title %}{% translate "Account" %}{% endblock %} - +{% block head_title %} + {% translate "Account" %} +{% endblock head_title %} {% block inner %} -

{% translate "E-mail Addresses" %}

- -{% if user.emailaddress_set.all %} -

{% translate 'The following e-mail addresses are associated with your account:' %}

- - - -{% else %} -

{% translate 'Warning:'%} {% translate "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}

- -{% endif %} - - -

{% translate "Add E-mail Address" %}

- -
- {% csrf_token %} - {{ form|crispy }} - +

{% translate "E-mail Addresses" %}

+ {% if user.emailaddress_set.all %} +

{% translate "The following e-mail addresses are associated with your account:" %}

+ + {% csrf_token %} +
+ {% for emailaddress in user.emailaddress_set.all %} +
+ +
+ {% endfor %} +
+ + + +
+
- -{% endblock %} - - + {% else %} +

+ {% translate "Warning:" %} {% translate "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %} +

+ {% endif %} +

{% translate "Add E-mail Address" %}

+
+ {% csrf_token %} + {{ form|crispy }} + +
+{% endblock inner %} {% block inline_javascript %} -{{ block.super }} - -{% endblock %} + +{% endblock inline_javascript %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email_confirm.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email_confirm.html index 5e4924c83..40ca4a47b 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email_confirm.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email_confirm.html @@ -3,30 +3,26 @@ {% load i18n %} {% load account %} -{% block head_title %}{% translate "Confirm E-mail Address" %}{% endblock %} - - +{% block head_title %} + {% translate "Confirm E-mail Address" %} +{% endblock head_title %} {% block inner %} -

{% translate "Confirm E-mail Address" %}

- -{% if confirmation %} - -{% user_display confirmation.email_address.user as user_display %} - -

{% blocktranslate with confirmation.email_address.email as email %}Please confirm that {{ email }} is an e-mail address for user {{ user_display }}.{% endblocktranslate %}

- -
-{% csrf_token %} - -
- -{% else %} - -{% url 'account_email' as email_url %} - -

{% blocktranslate %}This e-mail confirmation link expired or is invalid. Please issue a new e-mail confirmation request.{% endblocktranslate %}

- -{% endif %} - -{% endblock %} +

{% translate "Confirm E-mail Address" %}

+ {% if confirmation %} + {% user_display confirmation.email_address.user as user_display %} +

+ {% blocktranslate with confirmation.email_address.email as email %}Please confirm that {{ email }} is an e-mail address for user {{ user_display }}.{% endblocktranslate %} +

+
+ {% csrf_token %} + +
+ {% else %} + {% url 'account_email' as email_url %} +

+ {% blocktranslate %}This e-mail confirmation link expired or is invalid. Please issue a new e-mail confirmation request.{% endblocktranslate %} +

+ {% endif %} +{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/login.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/login.html index 25a292eda..5737afc06 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/login.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/login.html @@ -4,57 +4,50 @@ {% load account socialaccount %} {% load crispy_forms_tags %} -{% block head_title %}{% translate "Sign In" %}{% endblock %} - +{% block head_title %} + {% translate "Sign In" %} +{% endblock head_title %} {% block inner %} - -

{% translate "Sign In" %}

- -{% get_providers as socialaccount_providers %} - -{% if socialaccount_providers %} -

- {% translate "Please sign in with one of your existing third party accounts:" %} - {% if ACCOUNT_ALLOW_REGISTRATION %} - {% blocktranslate trimmed %} - Or, sign up - for a {{ site_name }} account and sign in below: - {% endblocktranslate %} - {% endif %} -

- -
- -
    - {% include "socialaccount/snippets/provider_list.html" with process="login" %} -
- - - -
- - {% include "socialaccount/snippets/login_extra.html" %} - -{% else %} - {% if ACCOUNT_ALLOW_REGISTRATION %} +

{% translate "Sign In" %}

+ {% get_providers as socialaccount_providers %} + {% if socialaccount_providers %}

- {% blocktranslate trimmed %} - If you have not created an account yet, then please - sign up first. - {% endblocktranslate %} + {% translate "Please sign in with one of your existing third party accounts:" %} + {% if ACCOUNT_ALLOW_REGISTRATION %} + {% blocktranslate trimmed %} + Or, sign up + for a {{ site_name }} account and sign in below: + {% endblocktranslate %} + {% endif %}

+
+
    + {% include "socialaccount/snippets/provider_list.html" with process="login" %} +
+ +
+ {% include "socialaccount/snippets/login_extra.html" %} + {% else %} + {% if ACCOUNT_ALLOW_REGISTRATION %} +

+ {% blocktranslate trimmed %} + If you have not created an account yet, then please + sign up first. + {% endblocktranslate %} +

+ {% endif %} {% endif %} -{% endif %} - - - -{% endblock %} + +{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/logout.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/logout.html index 5edc60478..43ae9ed38 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/logout.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/logout.html @@ -2,19 +2,20 @@ {% load i18n %} -{% block head_title %}{% translate "Sign Out" %}{% endblock %} - +{% block head_title %} + {% translate "Sign Out" %} +{% endblock head_title %} {% block inner %} -

{% translate "Sign Out" %}

- -

{% translate 'Are you sure you want to sign out?' %}

- -
- {% csrf_token %} - {% if redirect_field_value %} - - {% endif %} - -
-{% endblock %} +

{% translate "Sign Out" %}

+

{% translate "Are you sure you want to sign out?" %}

+
+ {% csrf_token %} + {% if redirect_field_value %} + + {% endif %} + +
+{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_change.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_change.html index b8dd7ac53..2e6110d5d 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_change.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_change.html @@ -3,15 +3,17 @@ {% load i18n %} {% load crispy_forms_tags %} -{% block head_title %}{% translate "Change Password" %}{% endblock %} - +{% block head_title %} + {% translate "Change Password" %} +{% endblock head_title %} {% block inner %} -

{% translate "Change Password" %}

- -
- {% csrf_token %} - {{ form|crispy }} - -
-{% endblock %} +

{% translate "Change Password" %}

+
+ {% csrf_token %} + {{ form|crispy }} + +
+{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset.html index f424b2111..0c184269a 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset.html @@ -4,23 +4,26 @@ {% load account %} {% load crispy_forms_tags %} -{% block head_title %}{% translate "Password Reset" %}{% endblock %} - +{% block head_title %} + {% translate "Password Reset" %} +{% endblock head_title %} {% block inner %} - -

{% translate "Password Reset" %}

- {% if user.is_authenticated %} +

{% translate "Password Reset" %}

+ {% if user.is_authenticated %} {% include "account/snippets/already_logged_in.html" %} - {% endif %} - -

{% translate "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}

- -
- {% csrf_token %} - {{ form|crispy }} - -
- -

{% blocktranslate %}Please contact us if you have any trouble resetting your password.{% endblocktranslate %}

-{% endblock %} + {% endif %} +

+ {% translate "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %} +

+
+ {% csrf_token %} + {{ form|crispy }} + +
+

{% blocktranslate %}Please contact us if you have any trouble resetting your password.{% endblocktranslate %}

+{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_done.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_done.html index 76d07eb21..a596425bb 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_done.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_done.html @@ -3,15 +3,16 @@ {% load i18n %} {% load account %} -{% block head_title %}{% translate "Password Reset" %}{% endblock %} - +{% block head_title %} + {% translate "Password Reset" %} +{% endblock head_title %} {% block inner %} -

{% translate "Password Reset" %}

- - {% if user.is_authenticated %} +

{% translate "Password Reset" %}

+ {% if user.is_authenticated %} {% include "account/snippets/already_logged_in.html" %} - {% endif %} - -

{% blocktranslate %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktranslate %}

-{% endblock %} + {% endif %} +

+ {% blocktranslate %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktranslate %} +

+{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_from_key.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_from_key.html index ce5d72a6d..a958ba089 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_from_key.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_from_key.html @@ -2,24 +2,36 @@ {% load i18n %} {% load crispy_forms_tags %} -{% block head_title %}{% translate "Change Password" %}{% endblock %} +{% block head_title %} + {% translate "Change Password" %} +{% endblock head_title %} {% block inner %} -

{% if token_fail %}{% translate "Bad Token" %}{% else %}{% translate "Change Password" %}{% endif %}

- +

{% if token_fail %} - {% url 'account_reset_password' as passwd_reset_url %} -

{% blocktranslate %}The password reset link was invalid, possibly because it has already been used. Please request a new password reset.{% endblocktranslate %}

+ {% translate "Bad Token" %} {% else %} - {% if form %} -
- {% csrf_token %} - {{ form|crispy }} - -
- {% else %} -

{% translate 'Your password is now changed.' %}

- {% endif %} + {% translate "Change Password" %} {% endif %} -{% endblock %} +

+ {% if token_fail %} + {% url 'account_reset_password' as passwd_reset_url %} +

+ {% blocktranslate %}The password reset link was invalid, possibly because it has already been used. Please request a new password reset.{% endblocktranslate %} +

+ {% else %} + {% if form %} +
+ {% csrf_token %} + {{ form|crispy }} + +
+ {% else %} +

{% translate "Your password is now changed." %}

+ {% endif %} + {% endif %} +{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_from_key_done.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_from_key_done.html index 34123fd53..ee399b404 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_from_key_done.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_reset_from_key_done.html @@ -1,10 +1,12 @@ {% raw %}{% extends "account/base.html" %} {% load i18n %} -{% block head_title %}{% translate "Change Password" %}{% endblock %} +{% block head_title %} + {% translate "Change Password" %} +{% endblock head_title %} {% block inner %} -

{% translate "Change Password" %}

-

{% translate 'Your password is now changed.' %}

-{% endblock %} +

{% translate "Change Password" %}

+

{% translate "Your password is now changed." %}

+{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_set.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_set.html index 812410fc0..3efc30874 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_set.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/password_set.html @@ -3,15 +3,20 @@ {% load i18n %} {% load crispy_forms_tags %} -{% block head_title %}{% translate "Set Password" %}{% endblock %} - +{% block head_title %} + {% translate "Set Password" %} +{% endblock head_title %} {% block inner %} -

{% translate "Set Password" %}

- -
- {% csrf_token %} - {{ form|crispy }} - -
-{% endblock %} +

{% translate "Set Password" %}

+
+ {% csrf_token %} + {{ form|crispy }} + +
+{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/signup.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/signup.html index 8c1c11aca..54150a474 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/signup.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/signup.html @@ -3,21 +3,26 @@ {% load i18n %} {% load crispy_forms_tags %} -{% block head_title %}{% translate "Signup" %}{% endblock %} - +{% block head_title %} + {% translate "Signup" %} +{% endblock head_title %} {% block inner %} -

{% translate "Sign Up" %}

- -

{% blocktranslate %}Already have an account? Then please sign in.{% endblocktranslate %}

- - - -{% endblock %} +

{% translate "Sign Up" %}

+

+ {% blocktranslate %}Already have an account? Then please sign in.{% endblocktranslate %} +

+ +{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/signup_closed.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/signup_closed.html index c2e64d14f..b3472ed6d 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/signup_closed.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/signup_closed.html @@ -2,11 +2,11 @@ {% load i18n %} -{% block head_title %}{% translate "Sign Up Closed" %}{% endblock %} - +{% block head_title %} + {% translate "Sign Up Closed" %} +{% endblock head_title %} {% block inner %} -

{% translate "Sign Up Closed" %}

- -

{% translate "We are sorry, but the sign up is currently closed." %}

-{% endblock %} +

{% translate "Sign Up Closed" %}

+

{% translate "We are sorry, but the sign up is currently closed." %}

+{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/verification_sent.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/verification_sent.html index be8f1cef9..d71bbc41a 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/verification_sent.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/verification_sent.html @@ -2,12 +2,13 @@ {% load i18n %} -{% block head_title %}{% translate "Verify Your E-mail Address" %}{% endblock %} - +{% block head_title %} + {% translate "Verify Your E-mail Address" %} +{% endblock head_title %} {% block inner %} -

{% translate "Verify Your E-mail Address" %}

- -

{% blocktranslate %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktranslate %}

- -{% endblock %} +

{% translate "Verify Your E-mail Address" %}

+

+ {% blocktranslate %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktranslate %} +

+{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/verified_email_required.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/verified_email_required.html index 2148a1804..b736581ce 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/verified_email_required.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/verified_email_required.html @@ -2,21 +2,24 @@ {% load i18n %} -{% block head_title %}{% translate "Verify Your E-mail Address" %}{% endblock %} - +{% block head_title %} + {% translate "Verify Your E-mail Address" %} +{% endblock head_title %} {% block inner %} -

{% translate "Verify Your E-mail Address" %}

- -{% url 'account_email' as email_url %} - -

{% blocktranslate %}This part of the site requires us to verify that +

{% translate "Verify Your E-mail Address" %}

+ {% url 'account_email' as email_url %} +

+ {% blocktranslate %}This part of the site requires us to verify that you are who you claim to be. For this purpose, we require that you -verify ownership of your e-mail address. {% endblocktranslate %}

- -

{% blocktranslate %}We have sent an e-mail to you for +verify ownership of your e-mail address. {% endblocktranslate %} +

+

+ {% blocktranslate %}We have sent an e-mail to you for verification. Please click on the link inside this e-mail. Please -contact us if you do not receive it within a few minutes.{% endblocktranslate %}

- -

{% blocktranslate %}Note: you can still change your e-mail address.{% endblocktranslate %}

-{% endblock %} +contact us if you do not receive it within a few minutes.{% endblocktranslate %} +

+

+ {% blocktranslate %}Note: you can still change your e-mail address.{% endblocktranslate %} +

+{% endblock inner %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index 44f0d5c52..421973e57 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -1,150 +1,194 @@ -{% raw %}{% load static i18n {% endraw %} -{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}compress -{%- endif %}{% raw %}%}{% endraw %} -{%- if cookiecutter.frontend_pipeline == 'Webpack' %}{% raw %}{% load render_bundle from webpack_loader %}{% endraw %} +{% raw %} +{% load static i18n {% endraw %} + +{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}compress{%- endif %}{% raw %}%}{% endraw %} + {%- if cookiecutter.frontend_pipeline == 'Webpack' %}{% raw %} + {% load render_bundle from webpack_loader %} + + {% endraw %} {%- endif %}{% raw %} {% get_current_language as LANGUAGE_CODE %} - - - {% block title %}{% endraw %}{{ cookiecutter.project_name }}{% raw %}{% endblock title %} - - - - - - - {% block css %} - {%- endraw %} - {%- if cookiecutter.frontend_pipeline in ['None', 'Django Compressor'] %} + + + + {% block title %} + {% endraw %}{{ cookiecutter.project_name }}{% raw %} + {% endblock title %} + + + + + + {% block css %} + {%- endraw %} + {%- if cookiecutter.frontend_pipeline in ['None', 'Django Compressor'] %} {%- raw %} - - {%- endraw %} - {%- endif %} - {%- raw %} - - - - {%- endraw %}{% if cookiecutter.frontend_pipeline == 'None' %}{% raw %} - - {%- endraw %}{% elif cookiecutter.frontend_pipeline == 'Django Compressor' %}{% raw %} - {% compress css %} - - {% endcompress %} - {%- endraw %}{% elif cookiecutter.frontend_pipeline == 'Gulp' %}{% raw %} - - {%- endraw %}{% elif cookiecutter.frontend_pipeline == "Webpack" %}{% raw %} - {% render_bundle 'project' 'css' %} - {%- endraw %}{% endif %}{% raw %} - {% endblock %} - + +{%- endraw %} +{% if cookiecutter.frontend_pipeline == 'None' %} + {% raw %} + +{%- endraw %} +{% elif cookiecutter.frontend_pipeline == 'Django Compressor' %} +{% raw %} +{% compress css %} + +{% endcompress %} +{%- endraw %} +{% elif cookiecutter.frontend_pipeline == 'Gulp' %} +{% raw %} + +{%- endraw %} +{% elif cookiecutter.frontend_pipeline == "Webpack" %} +{% raw %} +{% render_bundle 'project' 'css' %} +{%- endraw %} +{% endif %} +{% raw %} +{% endblock css %} + - {# Placed at the top of the document so pages load faster with defer #} - {% block javascript %} - {%- endraw %}{% if cookiecutter.frontend_pipeline == 'Gulp' %}{% raw %} - - - {%- endraw %}{% elif cookiecutter.frontend_pipeline == "Webpack" %}{% raw %} - - {% render_bundle 'vendors' 'js' attrs='defer' %} - {%- endraw %}{% else %}{% raw %} - - - - {%- endraw %}{% endif %}{% raw %} - - - {%- endraw %}{% if cookiecutter.frontend_pipeline == 'None' %}{% raw %} - - {%- endraw %}{% elif cookiecutter.frontend_pipeline == 'Django Compressor' %}{% raw %} - {% compress js %} - - {% endcompress %} - {%- endraw %}{% elif cookiecutter.frontend_pipeline == 'Gulp' %}{% raw %} - - {%- endraw %}{% elif cookiecutter.frontend_pipeline == "Webpack" %}{% raw %} - {% render_bundle 'project' 'js' attrs='defer' %} - {%- endraw %}{% endif %}{% raw %} - - {% endblock javascript %} - - - - - -
- - -
- -
- - {% if messages %} - {% for message in messages %} -
- {{ message }} - -
- {% endfor %} - {% endif %} - - {% block content %} -

Use this document as a way to quick start any new project.

- {% endblock content %} - -
- - {% block modal %}{% endblock modal %} - - {% block inline_javascript %} +
+ + +
+ {% if messages %} + {% for message in messages %} +
+ {{ message }} + +
+ {% endfor %} + {% endif %} + {% block content %} +

Use this document as a way to quick start any new project.

+ {% endblock content %} +
+ + {% block modal %} + {% endblock modal %} + {% block inline_javascript %} {% comment %} Script tags with only code, no src (defer by default). To run with a "defer" so that you run inline code: {% endcomment %} - {% endblock inline_javascript %} - + {% endblock inline_javascript %} + {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/pages/about.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/pages/about.html index 8968a3d4f..3d301eead 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/pages/about.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/pages/about.html @@ -1 +1,3 @@ -{% raw %}{% extends "base.html" %}{% endraw %} +{% raw %}{% extends "base.html" %} + +{% endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/pages/home.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/pages/home.html index 8968a3d4f..3d301eead 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/pages/home.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/pages/home.html @@ -1 +1,3 @@ -{% raw %}{% extends "base.html" %}{% endraw %} +{% raw %}{% extends "base.html" %} + +{% endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_detail.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_detail.html index ee2c4aee9..4e632b015 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_detail.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_detail.html @@ -1,35 +1,45 @@ {% raw %}{% extends "base.html" %} + {% load static %} -{% block title %}User: {% endraw %}{% if cookiecutter.username_type == "email" %}{% raw %}{{ object.name }}{% endraw %}{% else %}{% raw %}{{ object.username }}{% endraw %}{% endif %}{% raw %}{% endblock %} - +{% block title %} + User: {% endraw %} + {% if cookiecutter.username_type == "email" %} + {% raw %}{{ object.name }}{% endraw %} + {% else %} + {% raw %}{{ object.username }}{% endraw %} + {% endif %} + {% raw %} +{% endblock title %} {% block content %} -
- -
-
- -

{% endraw %}{% if cookiecutter.username_type == "email" %}{% raw %}{{ object.name }}{% endraw %}{% else %}{% raw %}{{ object.username }}{% endraw %}{% endif %}{% raw %}

- {% if object.name %} -

{{ object.name }}

- {% endif %} +
+
+
+

+ {% endraw %} + {% if cookiecutter.username_type == "email" %} + {% raw %}{{ object.name }}{% endraw %} + {% else %} + {% raw %}{{ object.username }}{% endraw %} + {% endif %} + {% raw %} +

+ {% if object.name %}

{{ object.name }}

{% endif %}
- -{% if object == request.user %} - -
- -
- My Info - E-Mail - -
- -
- -{% endif %} - + {% if object == request.user %} + +
+
+ My Info + E-Mail + +
+
+ + {% endif %}
{% endblock content %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_form.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_form.html index 65401624a..bd1299a6d 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_form.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_form.html @@ -1,18 +1,36 @@ {% raw %}{% extends "base.html" %} + {% load crispy_forms_tags %} -{% block title %}{% endraw %}{% if cookiecutter.username_type == "email" %}{% raw %}{{ user.name }}{% endraw %}{% else %}{% raw %}{{ user.username }}{% endraw %}{% endif %}{% raw %}{% endblock %} - +{% block title %} +{% endraw %} +{% if cookiecutter.username_type == "email" %} + {% raw %}{{ user.name }}{% endraw %} +{% else %} + {% raw %}{{ user.username }}{% endraw %} +{% endif %} +{% raw %} +{% endblock title %} {% block content %} -

{% endraw %}{% if cookiecutter.username_type == "email" %}{% raw %}{{ user.name }}{% endraw %}{% else %}{% raw %}{{ user.username }}{% endraw %}{% endif %}{% raw %}

-
- {% csrf_token %} - {{ form|crispy }} -
-
- -
+

+ {% endraw %} + {% if cookiecutter.username_type == "email" %} + {% raw %}{{ user.name }}{% endraw %} + {% else %} + {% raw %}{{ user.username }}{% endraw %} + {% endif %} + {% raw %} +

+ + {% csrf_token %} + {{ form|crispy }} +
+
+
- -{% endblock %} +
+ +{% endblock content %} {%- endraw %} From d0e36d7d28df86ccedcf88cc3b43b3b9176efbd6 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 27 Jun 2023 16:52:58 -0500 Subject: [PATCH 047/157] Update django-stubs to 4.2.2 (#4419) --- {{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 bf4e8a49d..d4d9d7d37 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -14,7 +14,7 @@ watchfiles==0.19.0 # https://github.com/samuelcolvin/watchfiles # Testing # ------------------------------------------------------------------------------ mypy==1.4.1 # https://github.com/python/mypy -django-stubs==4.2.1 # https://github.com/typeddjango/django-stubs +django-stubs==4.2.2 # https://github.com/typeddjango/django-stubs pytest==7.4.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} From 0225a7c83f45dfd2b1bf3c3ec2e638305cdc7dfb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 27 Jun 2023 17:08:18 -0500 Subject: [PATCH 048/157] Update djangorestframework-stubs to 3.14.2 (#4420) --- {{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 d4d9d7d37..3d8938f33 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -18,7 +18,7 @@ django-stubs==4.2.2 # https://github.com/typeddjango/django-stubs pytest==7.4.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} -djangorestframework-stubs==3.14.1 # https://github.com/typeddjango/djangorestframework-stubs +djangorestframework-stubs==3.14.2 # https://github.com/typeddjango/djangorestframework-stubs {%- endif %} # Documentation From d13e4270c254e649760cbae5647023fd376d2878 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Tue, 27 Jun 2023 18:18:19 -0400 Subject: [PATCH 049/157] Remove prettier unless in pre-commit (#4418) * Remove prettier webpack in pre-commit * Update {{cookiecutter.project_slug}}/.pre-commit-config.yaml Co-authored-by: Bruno Alla * Tweak vertical spacing --------- Co-authored-by: Bruno Alla Co-authored-by: Bruno Alla --- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index f400001f1..ae602a364 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -16,6 +16,7 @@ repos: - id: check-case-conflict - id: check-docstring-first - id: detect-private-key +{%- if cookiecutter.frontend_pipeline in ["Webpack", "Gulp"] %} - repo: https://github.com/pre-commit/mirrors-prettier rev: v3.0.0-alpha.9-for-vscode @@ -23,6 +24,7 @@ repos: - id: prettier args: ['--tab-width', '2', '--single-quote'] exclude: '{{cookiecutter.project_slug}}/templates/' +{%- endif %} - repo: https://github.com/adamchainz/django-upgrade rev: '1.14.0' From 5a7de40b839b1b8bf52d7d9a490e4d380b2587c5 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Tue, 27 Jun 2023 18:36:01 -0400 Subject: [PATCH 050/157] Populate user name field in social auth (#3968) * Populate user name field in social auth * Add docstring for populate_user * Fix missing def * Fix missing def * Add some type hints to the SocialAccountAdapter class --------- Co-authored-by: Bruno Alla Co-authored-by: Bruno Alla --- .../users/adapters.py | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py index 0d206fae4..c5c824bda 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py @@ -1,16 +1,37 @@ -from typing import Any +from __future__ import annotations + +import typing from allauth.account.adapter import DefaultAccountAdapter from allauth.socialaccount.adapter import DefaultSocialAccountAdapter from django.conf import settings from django.http import HttpRequest +if typing.TYPE_CHECKING: + from allauth.socialaccount.models import SocialLogin + from {{cookiecutter.project_slug}}.users.models import User + class AccountAdapter(DefaultAccountAdapter): - def is_open_for_signup(self, request: HttpRequest): + def is_open_for_signup(self, request: HttpRequest) -> bool: return getattr(settings, "ACCOUNT_ALLOW_REGISTRATION", True) class SocialAccountAdapter(DefaultSocialAccountAdapter): - def is_open_for_signup(self, request: HttpRequest, sociallogin: Any): + def is_open_for_signup(self, request: HttpRequest, sociallogin: SocialLogin) -> bool: return getattr(settings, "ACCOUNT_ALLOW_REGISTRATION", True) + + def populate_user(self, request: HttpRequest, sociallogin: SocialLogin, data: dict[str, typing.Any]) -> User: + """ + Populates user information from social provider info. + + See: https://django-allauth.readthedocs.io/en/latest/advanced.html?#creating-and-populating-user-instances + """ + user = sociallogin.user + if name := data.get("name"): + user.name = name + elif first_name := data.get("first_name"): + user.name = first_name + if last_name := data.get("last_name"): + user.name += f" {last_name}" + return super().populate_user(request, sociallogin, data) From e9eb72b0b9614c6718cdc03a7a706c43cda107e6 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 27 Jun 2023 23:52:40 +0100 Subject: [PATCH 051/157] Update django-compressor from 4.3.1 to 4.4 --- {{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 d23da8c61..1a39feb82 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -35,7 +35,7 @@ django-allauth==0.54.0 # https://github.com/pennersr/django-allauth django-crispy-forms==2.0 # https://github.com/django-crispy-forms/django-crispy-forms crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5 {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} -django-compressor==4.3.1 # https://github.com/django-compressor/django-compressor +django-compressor==4.4 # https://github.com/django-compressor/django-compressor {%- endif %} django-redis==5.3.0 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == 'y' %} From 199278b5ca17d4acd989e3c18760711d00e8d811 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 28 Jun 2023 02:32:45 +0000 Subject: [PATCH 052/157] Release 2023.06.27 --- CHANGELOG.md | 19 +++++++++++++++++++ setup.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 309f62a26..e60e18d27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,25 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.06.27 + + +### Changed + +- Populate User `name` field during social auth ([#3968](https://github.com/cookiecutter/cookiecutter-django/pull/3968)) + +- Add djLint for HTML formatting and linting ([#4389](https://github.com/cookiecutter/cookiecutter-django/pull/4389)) + +### Fixed + +- Only include prettier pre-commit hook with node-based front-end pipeline ([#4418](https://github.com/cookiecutter/cookiecutter-django/pull/4418)) + +### Updated + +- Update djangorestframework-stubs to 3.14.2 ([#4420](https://github.com/cookiecutter/cookiecutter-django/pull/4420)) + +- Update django-stubs to 4.2.2 ([#4419](https://github.com/cookiecutter/cookiecutter-django/pull/4419)) + ## 2023.06.26 diff --git a/setup.py b/setup.py index bf58e0239..571407bf3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.26" +version = "2023.06.27" with open("README.rst") as readme_file: long_description = readme_file.read() From ef36732569cb5baaa5b26e45888831c97e2392fd Mon Sep 17 00:00:00 2001 From: Jelmer Draaijer Date: Wed, 28 Jun 2023 08:38:04 +0200 Subject: [PATCH 053/157] Set target-version for django upgrade to 4.2 --- tests/test_cookiecutter_generation.py | 2 +- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 778e3411f..6ffce81db 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -231,7 +231,7 @@ def test_django_upgrade_passes(cookies, context_override): try: sh.django_upgrade( "--target-version", - "4.1", + "4.2", *python_files, _cwd=str(result.project_path), ) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 91a50b97d..4fe4778bc 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -28,7 +28,7 @@ repos: rev: '1.13.0' hooks: - id: django-upgrade - args: ['--target-version', '4.1'] + args: ['--target-version', '4.2'] - repo: https://github.com/asottile/pyupgrade rev: v3.6.0 From 9a74e459e4ab94d237806d9b21c718ae70ab8316 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:19:56 -0400 Subject: [PATCH 054/157] Fix entrypoint --- .../compose/production/django/entrypoint | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint index 2fbcad955..dd07f2d2a 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/entrypoint +++ b/{{cookiecutter.project_slug}}/compose/production/django/entrypoint @@ -20,14 +20,14 @@ python << END import sys import time -import psycopg2 +import psycopg suggest_unrecoverable_after = 30 start = time.time() while True: try: - psycopg2.connect( + psycopg.connect( dbname="${POSTGRES_DB}", user="${POSTGRES_USER}", password="${POSTGRES_PASSWORD}", @@ -35,7 +35,7 @@ while True: port="${POSTGRES_PORT}", ) break - except psycopg2.OperationalError as error: + except psycopg.OperationalError as error: sys.stderr.write("Waiting for PostgreSQL to become available...\n") if time.time() - start > suggest_unrecoverable_after: From 5b85233d3051493e08d51410b232d632739408c2 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 28 Jun 2023 09:31:08 -0500 Subject: [PATCH 055/157] Update werkzeug to 2.3.6 (#4427) --- {{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 3d8938f33..2b0e954f7 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,6 +1,6 @@ -r base.txt -Werkzeug[watchdog]==2.3.5 # https://github.com/pallets/werkzeug +Werkzeug[watchdog]==2.3.6 # https://github.com/pallets/werkzeug ipdb==0.13.13 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.9.6 # https://github.com/psycopg/psycopg2 From c5940219c74b0447a013bd4886d8892f9eadaf17 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Wed, 28 Jun 2023 18:35:50 -0400 Subject: [PATCH 056/157] Fix PostgreSQL version in GitHub workflow (#4423) --- {{cookiecutter.project_slug}}/.github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml index ac231ee72..8f9824e8f 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: - 6379:6379 {%- endif %} postgres: - image: postgres:12 + image: postgres:{{ cookiecutter.postgresql_version }} ports: - 5432:5432 env: From 9e54d402967b24297412ef486dec87b9f66f3c36 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 29 Jun 2023 02:31:56 +0000 Subject: [PATCH 057/157] Release 2023.06.28 --- CHANGELOG.md | 17 +++++++++++++++++ setup.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e60e18d27..83169c7bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.06.28 + + +### Changed + +- Upgrade to django 4.2 ([#4393](https://github.com/cookiecutter/cookiecutter-django/pull/4393)) + +### Fixed + +- Fix PostgreSQL version in GitHub workflow ([#4423](https://github.com/cookiecutter/cookiecutter-django/pull/4423)) + +### Updated + +- Update werkzeug to 2.3.6 ([#4427](https://github.com/cookiecutter/cookiecutter-django/pull/4427)) + +- Update django-compressor to 4.4 ([#4422](https://github.com/cookiecutter/cookiecutter-django/pull/4422)) + ## 2023.06.27 diff --git a/setup.py b/setup.py index 660847550..f733e950f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.27" +version = "2023.06.28" with open("README.rst") as readme_file: long_description = readme_file.read() From ab29818ceb4b046bf90dc10343f81bbcbd7894fd Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 30 Jun 2023 02:30:21 +0000 Subject: [PATCH 058/157] Release 2023.06.29 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83169c7bd..bd15dcead 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.06.29 + + +### Changed + +- Replace psycopg2 by psycopg3 ([#4421](https://github.com/cookiecutter/cookiecutter-django/pull/4421)) + ## 2023.06.28 diff --git a/setup.py b/setup.py index f733e950f..3ef33468c 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.28" +version = "2023.06.29" with open("README.rst") as readme_file: long_description = readme_file.read() From 397100dcab34a45c15cab5562c45e26bed2a6653 Mon Sep 17 00:00:00 2001 From: Will Gordon Date: Fri, 30 Jun 2023 05:50:20 -0400 Subject: [PATCH 059/157] Allow django-admin to optionally use django-allauth login workflow (#1921) * Allow django-admin to optionally use django-allauth login workflow * Fix mypy and add a comment to allauth documentation --------- Co-authored-by: Bruno Alla --- docs/settings.rst | 3 +++ {{cookiecutter.project_slug}}/config/settings/base.py | 3 +++ .../{{cookiecutter.project_slug}}/users/admin.py | 8 +++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/settings.rst b/docs/settings.rst index 6dacb7404..0880bce95 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -81,3 +81,6 @@ Other Environment Settings DJANGO_ACCOUNT_ALLOW_REGISTRATION (=True) Allow enable or disable user registration through `django-allauth` without disabling other characteristics like authentication and account management. (Django Setting: ACCOUNT_ALLOW_REGISTRATION) + +DJANGO_ADMIN_FORCE_ALLAUTH (=False) + Force the `admin` sign in process to go through the `django-allauth` workflow. diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 487669e0a..c9feedea1 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -250,6 +250,9 @@ ADMIN_URL = "admin/" ADMINS = [("""{{cookiecutter.author_name}}""", "{{cookiecutter.email}}")] # https://docs.djangoproject.com/en/dev/ref/settings/#managers MANAGERS = ADMINS +# https://cookiecutter-django.readthedocs.io/en/latest/settings.html#other-environment-settings +# Force the `admin` sign in process to go through the `django-allauth` workflow +DJANGO_ADMIN_FORCE_ALLAUTH = env.bool('DJANGO_ADMIN_FORCE_ALLAUTH', default=False) # LOGGING # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py index d81c0a3b0..a5f89dd67 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py @@ -1,12 +1,18 @@ +from django.conf import settings from django.contrib import admin from django.contrib.auth import admin as auth_admin -from django.contrib.auth import get_user_model +from django.contrib.auth import get_user_model, decorators from django.utils.translation import gettext_lazy as _ from {{ cookiecutter.project_slug }}.users.forms import UserAdminChangeForm, UserAdminCreationForm User = get_user_model() +if settings.DJANGO_ADMIN_FORCE_ALLAUTH: + # Force the `admin` sign in process to go through the `django-allauth` workflow: + # https://django-allauth.readthedocs.io/en/stable/advanced.html#admin + admin.site.login = decorators.login_required(admin.site.login) # type: ignore[method-assign] + @admin.register(User) class UserAdmin(auth_admin.UserAdmin): From 72a11fdf685bb20ade25a67446fcd06cbc9dbd2e Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 1 Jul 2023 02:35:28 +0000 Subject: [PATCH 060/157] Release 2023.06.30 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd15dcead..e8bffadd3 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.06.30 + + +### Changed + +- Add option to use django-allauth workflow in the admin ([#1921](https://github.com/cookiecutter/cookiecutter-django/pull/1921)) + ## 2023.06.29 diff --git a/setup.py b/setup.py index 3ef33468c..b0f1c97a0 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.29" +version = "2023.06.30" with open("README.rst") as readme_file: long_description = readme_file.read() From 1ed6d6e03b596d397099c6b86d366330b2cf7528 Mon Sep 17 00:00:00 2001 From: masavini Date: Mon, 3 Jul 2023 11:55:33 +0200 Subject: [PATCH 061/157] VS Code Dev Container (#4198) * decontainer setup * update * fix typo * keep .envs * add info * typo * minor fixes * keep compose/production * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add isort and lint * choose editor and configure devcontainer * choose editor and configure devcontainer * add ssh client * Remove isort arguments duplicated with base config * End of file * Only keep black as code formatter * Add note about black not being accepted as formatter in devcontainer * Avoid empty lines in devcontainer.json * Move bash_history into .devcontainer folder * Remove .prettierignore file --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bruno Alla Co-authored-by: Bruno Alla --- README.md | 6 +- cookiecutter.json | 2 +- docs/project-generation-options.rst | 12 ++- hooks/post_gen_project.py | 9 +- tests/test_cookiecutter_generation.py | 16 ++-- .../.devcontainer/bash_history | 0 .../.devcontainer/bashrc.override.sh | 20 +++++ .../.devcontainer/devcontainer.json | 87 +++++++++++++++++++ {{cookiecutter.project_slug}}/.gitignore | 7 +- .../compose/local/django/Dockerfile | 14 ++- {{cookiecutter.project_slug}}/docs/index.rst | 2 +- 11 files changed, 153 insertions(+), 22 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/.devcontainer/bash_history create mode 100644 {{cookiecutter.project_slug}}/.devcontainer/bashrc.override.sh create mode 100644 {{cookiecutter.project_slug}}/.devcontainer/devcontainer.json diff --git a/README.md b/README.md index 1a60f8ec6..633476986 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,11 @@ Answer the prompts with your own desired [options](http://cookiecutter-django.re Choose from 1, 2 [1]: 1 timezone [UTC]: America/Los_Angeles windows [n]: n - use_pycharm [n]: y + Select an editor to use. The choices are: + 1 - None + 2 - PyCharm + 3 - VS Code + Choose from 1, 2, 3 [1]: 1 use_docker [n]: n Select postgresql_version: 1 - 14 diff --git a/cookiecutter.json b/cookiecutter.json index 970a53795..cc9f8c177 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -16,7 +16,7 @@ "username_type": ["username", "email"], "timezone": "UTC", "windows": "n", - "use_pycharm": "n", + "editor": ["None", "PyCharm", "VS Code"], "use_docker": "n", "postgresql_version": ["14", "13", "12", "11", "10"], "cloud_provider": ["AWS", "GCP", "Azure", "None"], diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index a1d788173..c1dcf82de 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -53,11 +53,15 @@ timezone: windows: Indicates whether the project should be configured for development on Windows. -use_pycharm: - Indicates whether the project should be configured for development with PyCharm_. +editor: + Select an editor to use. The choices are: + + 1. None + 2. PyCharm_ + 3. `VS Code`_ use_docker: - Indicates whether the project should be configured to use Docker_ and `Docker Compose`_. + Indicates whether the project should be configured to use Docker_, `Docker Compose`_ and `devcontainer`_. postgresql_version: Select a PostgreSQL_ version to use. The choices are: @@ -148,9 +152,11 @@ debug: .. _Apache Software License 2.0: http://www.apache.org/licenses/LICENSE-2.0 .. _PyCharm: https://www.jetbrains.com/pycharm/ +.. _VS Code: https://github.com/microsoft/vscode .. _Docker: https://github.com/docker/docker .. _Docker Compose: https://docs.docker.com/compose/ +.. _devcontainer: https://containers.dev/ .. _PostgreSQL: https://www.postgresql.org/docs/ diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 11f165b78..292609403 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -74,12 +74,13 @@ def remove_pycharm_files(): def remove_docker_files(): + shutil.rmtree(".devcontainer") shutil.rmtree("compose") file_names = ["local.yml", "production.yml", ".dockerignore"] for file_name in file_names: os.remove(file_name) - if "{{ cookiecutter.use_pycharm }}".lower() == "y": + if "{{ cookiecutter.editor }}".lower() == "PyCharm": file_names = ["docker_compose_up_django.xml", "docker_compose_up_docs.xml"] for file_name in file_names: os.remove(os.path.join(".idea", "runConfigurations", file_name)) @@ -427,7 +428,7 @@ def main(): if "{{ cookiecutter.username_type }}" == "username": remove_custom_user_manager_files() - if "{{ cookiecutter.use_pycharm }}".lower() == "n": + if "{{ cookiecutter.editor }}".lower() != "PyCharm": remove_pycharm_files() if "{{ cookiecutter.use_docker }}".lower() == "y": @@ -445,8 +446,8 @@ def main(): if "{{ cookiecutter.keep_local_envs_in_vcs }}".lower() == "y": print( INFO + ".env(s) are only utilized when Docker Compose and/or " - "Heroku support is enabled so keeping them does not " - "make sense given your current setup." + TERMINATOR + "Heroku support is enabled so keeping them does not make sense " + "given your current setup." + TERMINATOR ) remove_envs_and_associated_files() else: diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index bb3ce479c..9e33d5315 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -52,8 +52,9 @@ SUPPORTED_COMBINATIONS = [ {"open_source_license": "Not open source"}, {"windows": "y"}, {"windows": "n"}, - {"use_pycharm": "y"}, - {"use_pycharm": "n"}, + {"editor": "None"}, + {"editor": "PyCharm"}, + {"editor": "VS Code"}, {"use_docker": "y"}, {"use_docker": "n"}, {"postgresql_version": "14"}, @@ -373,14 +374,15 @@ def test_error_if_incompatible(cookies, context, invalid_context): @pytest.mark.parametrize( - ["use_pycharm", "pycharm_docs_exist"], + ["editor", "pycharm_docs_exist"], [ - ("n", False), - ("y", True), + ("None", False), + ("PyCharm", True), + ("VS Code", False), ], ) -def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist): - context.update({"use_pycharm": use_pycharm}) +def test_pycharm_docs_removed(cookies, context, editor, pycharm_docs_exist): + context.update({"editor": editor}) result = cookies.bake(extra_context=context) with open(f"{result.project_path}/docs/index.rst") as f: diff --git a/{{cookiecutter.project_slug}}/.devcontainer/bash_history b/{{cookiecutter.project_slug}}/.devcontainer/bash_history new file mode 100644 index 000000000..e69de29bb diff --git a/{{cookiecutter.project_slug}}/.devcontainer/bashrc.override.sh b/{{cookiecutter.project_slug}}/.devcontainer/bashrc.override.sh new file mode 100644 index 000000000..bedddf64b --- /dev/null +++ b/{{cookiecutter.project_slug}}/.devcontainer/bashrc.override.sh @@ -0,0 +1,20 @@ + +# +# .bashrc.override.sh +# + +# persistent bash history +HISTFILE=~/.bash_history +PROMPT_COMMAND="history -a; $PROMPT_COMMAND" + +# set some django env vars +source /entrypoint + +# restore default shell options +set +o errexit +set +o pipefail +set +o nounset + +# start ssh-agent +# https://code.visualstudio.com/docs/remote/troubleshooting +eval "$(ssh-agent -s)" diff --git a/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json b/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json new file mode 100644 index 000000000..c11b8dd9a --- /dev/null +++ b/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json @@ -0,0 +1,87 @@ +// For format details, see https://containers.dev/implementors/json_reference/ +{ + "name": "{{cookiecutter.project_slug}}_dev", + "dockerComposeFile": [ + "../local.yml" + ], + "init": true, + "mounts": [ + { + "source": "./.devcontainer/bash_history", + "target": "/home/dev-user/.bash_history", + "type": "bind" + }, + { + "source": "~/.ssh", + "target": "/tmp", + "type": "bind" + }, + { + "source": "~/.ssh", + "target": "/home/dev-user/.ssh", + "type": "bind" + } + ], + // Tells devcontainer.json supporting services / tools whether they should run + // /bin/sh -c "while sleep 1000; do :; done" when starting the container instead of the container’s default command + "overrideCommand": true, + "service": "django", + // "remoteEnv": {"PATH": "/home/dev-user/.local/bin:${containerEnv:PATH}"}, + "remoteUser": "dev-user", + "workspaceFolder": "/app", + // Set *default* container specific settings.json values on container create. + "customizations": { + {%- if cookiecutter.editor == "VS Code" %} + "vscode": { + "settings": { + "editor.formatOnSave": true, + "[python]": { + "analysis.autoImportCompletions": true, + "analysis.typeCheckingMode": "basic", + "defaultInterpreterPath": "/usr/local/bin/python", + "editor.codeActionsOnSave": { + "source.organizeImports": true + }, + // Uncomment when fixed + // https://github.com/microsoft/vscode-remote-release/issues/8474 + // "editor.defaultFormatter": "ms-python.black-formatter", + "formatting.blackPath": "/usr/local/bin/black", + "formatting.provider": "black", + "languageServer": "Pylance", + // "linting.banditPath": "/usr/local/py-utils/bin/bandit", + "linting.enabled": true, + "linting.flake8Enabled": true, + "linting.flake8Path": "/usr/local/bin/flake8", + "linting.mypyEnabled": true, + "linting.mypyPath": "/usr/local/bin/mypy", + "linting.pycodestylePath": "/usr/local/bin/pycodestyle", + // "linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", + "linting.pylintEnabled": true, + "linting.pylintPath": "/usr/local/bin/pylint" + } + }, + // https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_vs-code-specific-properties + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "davidanson.vscode-markdownlint", + "mrmlnc.vscode-duplicate", + "visualstudioexptteam.vscodeintellicode", + "visualstudioexptteam.intellicode-api-usage-examples", + // python + "ms-python.python", + "ms-python.vscode-pylance", + "ms-python.isort", + "ms-python.black-formatter", + // django + "batisteo.vscode-django" + ] + } + {%- endif %} + }, + // Uncomment the next line if you want start specific services in your Docker Compose config. + // "runServices": [], + // Uncomment the next line if you want to keep your containers running after VS Code shuts down. + // "shutdownAction": "none", + // Uncomment the next line to run commands after the container is created. + "postCreateCommand": "cat .devcontainer/bashrc.override.sh >> ~/.bashrc" +} diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 19bb2bc07..541f40846 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -161,11 +161,10 @@ typings/ !.vscode/extensions.json *.code-workspace -# Local History for Visual Studio Code -.history/ +# Local History for devcontainer +.devcontainer/bash_history - -{% if cookiecutter.use_pycharm == 'y' -%} +{% if cookiecutter.editor == 'PyCharm' -%} # Provided default Pycharm Run/Debug Configurations should be tracked by git # In case of local modifications made by Pycharm, use update-index command # for each changed file, like this: diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index b1f459ba5..3636ce1ef 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -33,6 +33,18 @@ ENV BUILD_ENV ${BUILD_ENVIRONMENT} WORKDIR ${APP_HOME} +{% if cookiecutter.use_docker == "y" %} +# devcontainer dependencies and utils +RUN apt-get update && apt-get install --no-install-recommends -y \ + sudo git bash-completion nano ssh + +# Create devcontainer user and add it to sudoers +RUN groupadd --gid 1000 dev-user \ + && useradd --uid 1000 --gid dev-user --shell /bin/bash --create-home dev-user \ + && echo dev-user ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/dev-user \ + && chmod 0440 /etc/sudoers.d/dev-user +{% endif %} + # Install required system dependencies RUN apt-get update && apt-get install --no-install-recommends -y \ # psycopg2 dependencies @@ -49,7 +61,7 @@ COPY --from=python-build-stage /usr/src/app/wheels /wheels/ # use wheels to install python dependencies RUN pip install --no-cache-dir --no-index --find-links=/wheels/ /wheels/* \ - && rm -rf /wheels/ + && rm -rf /wheels/ COPY ./compose/production/django/entrypoint /entrypoint RUN sed -i 's/\r$//g' /entrypoint diff --git a/{{cookiecutter.project_slug}}/docs/index.rst b/{{cookiecutter.project_slug}}/docs/index.rst index cb4cbaeda..10b1c936f 100644 --- a/{{cookiecutter.project_slug}}/docs/index.rst +++ b/{{cookiecutter.project_slug}}/docs/index.rst @@ -10,7 +10,7 @@ Welcome to {{ cookiecutter.project_name }}'s documentation! :maxdepth: 2 :caption: Contents: - howto{% if cookiecutter.use_pycharm == 'y' %} + howto{% if cookiecutter.editor == 'PyCharm' %} pycharm/configuration{% endif %} users From 4519de8aaa0860a341965807016e172b15872415 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 3 Jul 2023 09:56:14 +0000 Subject: [PATCH 062/157] 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 f5d7a4df6..681dc19a3 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1398,5 +1398,10 @@ "name": "Matheus Jardim Bernardes", "github_login": "matheusjardimb", "twitter_username": "" + }, + { + "name": "masavini", + "github_login": "masavini", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 52072d8e2..fac839d02 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1307,6 +1307,13 @@ Listed in alphabetical order. + + masavini + + masavini + + + Mateusz Ostaszewski From a050ea83c1f083cb9df36e2652927771f0fdbdfc Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 3 Jul 2023 05:30:43 -0500 Subject: [PATCH 063/157] Update django from 4.2.2 to 4.2.3 (#4435) --- {{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 6dc038db6..47a0bc34b 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -28,7 +28,7 @@ uvicorn[standard]==0.22.0 # https://github.com/encode/uvicorn # Django # ------------------------------------------------------------------------------ -django==4.2.2 # pyup: < 5.0 # https://www.djangoproject.com/ +django==4.2.3 # pyup: < 5.0 # https://www.djangoproject.com/ django-environ==0.10.0 # https://github.com/joke2k/django-environ django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils django-allauth==0.54.0 # https://github.com/pennersr/django-allauth From bef0b0d29acb382acfa01b8a7911f487aec3fb2d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 3 Jul 2023 05:33:41 -0500 Subject: [PATCH 064/157] Update django-stubs from 4.2.2 to 4.2.3 (#4430) --- {{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 0674362f9..fe9231f03 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -14,7 +14,7 @@ watchfiles==0.19.0 # https://github.com/samuelcolvin/watchfiles # Testing # ------------------------------------------------------------------------------ mypy==1.4.1 # https://github.com/python/mypy -django-stubs==4.2.2 # https://github.com/typeddjango/django-stubs +django-stubs==4.2.3 # https://github.com/typeddjango/django-stubs pytest==7.4.0 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar {%- if cookiecutter.use_drf == "y" %} From 0530c52b6540dcf48107c3206f2e1897fb11e3bf Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 4 Jul 2023 02:33:16 +0000 Subject: [PATCH 065/157] Release 2023.07.03 --- CHANGELOG.md | 13 +++++++++++++ setup.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8bffadd3..53b4f635e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,19 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.03 + + +### Changed + +- Add a devcontainer configuration with Docker ([#4198](https://github.com/cookiecutter/cookiecutter-django/pull/4198)) + +### Updated + +- Update django-stubs to 4.2.3 ([#4430](https://github.com/cookiecutter/cookiecutter-django/pull/4430)) + +- Update django to 4.2.3 ([#4435](https://github.com/cookiecutter/cookiecutter-django/pull/4435)) + ## 2023.06.30 diff --git a/setup.py b/setup.py index b0f1c97a0..03b978f5b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.30" +version = "2023.07.03" with open("README.rst") as readme_file: long_description = readme_file.read() From 24656cd4509ff9466ada8f818d1044eb4e251b35 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 09:30:16 +0200 Subject: [PATCH 066/157] [pre-commit.ci] pre-commit autoupdate (#4438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.7.0 → v3.8.0](https://github.com/asottile/pyupgrade/compare/v3.7.0...v3.8.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b35eae073..3acfca53d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: args: ["--tab-width", "2"] - repo: https://github.com/asottile/pyupgrade - rev: v3.7.0 + rev: v3.8.0 hooks: - id: pyupgrade args: [--py311-plus] From de8759fdbd45ac288b97e050073a5d09f50029db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 09:33:31 +0200 Subject: [PATCH 067/157] Bump postcss-preset-env in /{{cookiecutter.project_slug}} (#4437) Bumps [postcss-preset-env](https://github.com/csstools/postcss-plugins/tree/HEAD/plugin-packs/postcss-preset-env) from 8.5.1 to 9.0.0. - [Changelog](https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/CHANGELOG.md) - [Commits](https://github.com/csstools/postcss-plugins/commits/HEAD/plugin-packs/postcss-preset-env) --- updated-dependencies: - dependency-name: postcss-preset-env dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- {{cookiecutter.project_slug}}/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index fdfd26bf3..99b984da6 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -25,7 +25,7 @@ "pixrem": "^5.0.0", "postcss": "^8.3.11", "postcss-loader": "^7.0.2", - "postcss-preset-env": "^8.0.1", + "postcss-preset-env": "^9.0.0", "sass": "^1.43.4", "sass-loader": "^13.2.0", "webpack": "^5.65.0", From d604fd7db174b97f9bc8af03a4febccd711a5ee4 Mon Sep 17 00:00:00 2001 From: Joseph Hanna Date: Tue, 4 Jul 2023 15:14:28 -0500 Subject: [PATCH 068/157] Add Postgresql 15 (#4431) * Add Postgresql 15 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- README.md | 13 +++++++------ cookiecutter.json | 2 +- docs/project-generation-options.rst | 11 ++++++----- tests/test_cookiecutter_generation.py | 1 + 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 633476986..0a39fb084 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ _These features can be enabled during initial project setup._ ## Constraints - Only maintained 3rd party libraries are used. -- Uses PostgreSQL everywhere: 10.19 - 14.1 ([MySQL fork](https://github.com/mabdullahadeel/cookiecutter-django-mysql) also available). +- Uses PostgreSQL everywhere: 10 - 15 ([MySQL fork](https://github.com/mabdullahadeel/cookiecutter-django-mysql) also available). - Environment variables for configuration (This won't work with Apache/mod_wsgi). ## Support this Project! @@ -133,11 +133,12 @@ Answer the prompts with your own desired [options](http://cookiecutter-django.re Choose from 1, 2, 3 [1]: 1 use_docker [n]: n Select postgresql_version: - 1 - 14 - 2 - 13 - 3 - 12 - 4 - 11 - 5 - 10 + 1 - 15 + 2 - 14 + 3 - 13 + 4 - 12 + 5 - 11 + 6 - 10 Choose from 1, 2, 3, 4, 5 [1]: 1 Select cloud_provider: 1 - AWS diff --git a/cookiecutter.json b/cookiecutter.json index cc9f8c177..3fcab4a78 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -18,7 +18,7 @@ "windows": "n", "editor": ["None", "PyCharm", "VS Code"], "use_docker": "n", - "postgresql_version": ["14", "13", "12", "11", "10"], + "postgresql_version": ["15", "14", "13", "12", "11", "10"], "cloud_provider": ["AWS", "GCP", "Azure", "None"], "mail_service": [ "Mailgun", diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index c1dcf82de..edf2306d4 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -66,11 +66,12 @@ use_docker: postgresql_version: Select a PostgreSQL_ version to use. The choices are: - 1. 14 - 2. 13 - 3. 12 - 4. 11 - 5. 10 + 1. 15 + 2. 14 + 3. 13 + 4. 12 + 5. 11 + 6. 10 cloud_provider: Select a cloud provider for static & media files. The choices are: diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 9e33d5315..2eb7ae52e 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -57,6 +57,7 @@ SUPPORTED_COMBINATIONS = [ {"editor": "VS Code"}, {"use_docker": "y"}, {"use_docker": "n"}, + {"postgresql_version": "15"}, {"postgresql_version": "14"}, {"postgresql_version": "13"}, {"postgresql_version": "12"}, From 7adb91cc1534dc3660181464e54bea26861676ae Mon Sep 17 00:00:00 2001 From: browniebroke Date: Tue, 4 Jul 2023 20:15:05 +0000 Subject: [PATCH 069/157] 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 681dc19a3..e08ce0b05 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1403,5 +1403,10 @@ "name": "masavini", "github_login": "masavini", "twitter_username": "" + }, + { + "name": "Joseph Hanna", + "github_login": "sanchimenea", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index fac839d02..184d445d5 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1069,6 +1069,13 @@ Listed in alphabetical order. + + Joseph Hanna + + sanchimenea + + + jugglinmike From 9085ff8ad7169dcb58e600c64408bfb7c49ddf2c Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 4 Jul 2023 16:05:33 -0500 Subject: [PATCH 070/157] Update sentry-sdk from 1.26.0 to 1.27.0 (#4439) --- {{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 a45ff8e77..eb6a14c28 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.26.0 # https://github.com/getsentry/sentry-python +sentry-sdk==1.27.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py From bdd6df3691cfc029c4cf70986c1c925d1d0d7dde Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 5 Jul 2023 02:32:47 +0000 Subject: [PATCH 071/157] Release 2023.07.04 --- CHANGELOG.md | 15 +++++++++++++++ setup.py | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53b4f635e..2ef5b220d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,21 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.04 + + +### Changed + +- Add PostgreSQL 15 ([#4431](https://github.com/cookiecutter/cookiecutter-django/pull/4431)) + +- [pre-commit.ci] pre-commit autoupdate ([#4438](https://github.com/cookiecutter/cookiecutter-django/pull/4438)) + +### Updated + +- Update sentry-sdk to 1.27.0 ([#4439](https://github.com/cookiecutter/cookiecutter-django/pull/4439)) + +- Update postcss-preset-env to 9.0.0 ([#4437](https://github.com/cookiecutter/cookiecutter-django/pull/4437)) + ## 2023.07.03 diff --git a/setup.py b/setup.py index 03b978f5b..f5705ab4b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.03" +version = "2023.07.04" with open("README.rst") as readme_file: long_description = readme_file.read() From b9acaad5e6f0d84e1fba8217ad87a42770fa2453 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Sat, 8 Jul 2023 05:10:46 -0500 Subject: [PATCH 072/157] Update sentry-sdk from 1.27.0 to 1.27.1 (#4440) --- {{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 eb6a14c28..b63fd7116 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.27.0 # https://github.com/getsentry/sentry-python +sentry-sdk==1.27.1 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py From ea9e90f1735ea0a18fbb6249b2b5357b7acd0444 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 9 Jul 2023 02:35:18 +0000 Subject: [PATCH 073/157] Release 2023.07.08 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ef5b220d..fb330f6ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.08 + + +### Updated + +- Update sentry-sdk to 1.27.1 ([#4440](https://github.com/cookiecutter/cookiecutter-django/pull/4440)) + ## 2023.07.04 diff --git a/setup.py b/setup.py index f5705ab4b..7acc6db73 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.04" +version = "2023.07.08" with open("README.rst") as readme_file: long_description = readme_file.read() From e0388d11c704abc98ada48aee54caf03f60f3979 Mon Sep 17 00:00:00 2001 From: tmajerech <56077800+tmajerech@users.noreply.github.com> Date: Sun, 9 Jul 2023 09:07:07 +0200 Subject: [PATCH 074/157] Fixed bug with pycharm editor option in post_gen_project.py (#4441) --- hooks/post_gen_project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 292609403..a913f7592 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -80,7 +80,7 @@ def remove_docker_files(): file_names = ["local.yml", "production.yml", ".dockerignore"] for file_name in file_names: os.remove(file_name) - if "{{ cookiecutter.editor }}".lower() == "PyCharm": + if "{{ cookiecutter.editor }}" == "PyCharm": file_names = ["docker_compose_up_django.xml", "docker_compose_up_docs.xml"] for file_name in file_names: os.remove(os.path.join(".idea", "runConfigurations", file_name)) @@ -428,7 +428,7 @@ def main(): if "{{ cookiecutter.username_type }}" == "username": remove_custom_user_manager_files() - if "{{ cookiecutter.editor }}".lower() != "PyCharm": + if "{{ cookiecutter.editor }}" != "PyCharm": remove_pycharm_files() if "{{ cookiecutter.use_docker }}".lower() == "y": From d21bb5929e463ff1923e506d6ea6d726671837dd Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 9 Jul 2023 07:07:57 +0000 Subject: [PATCH 075/157] 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 e08ce0b05..06bb53def 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1408,5 +1408,10 @@ "name": "Joseph Hanna", "github_login": "sanchimenea", "twitter_username": "" + }, + { + "name": "tmajerech", + "github_login": "tmajerech", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 184d445d5..4448d252e 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1839,6 +1839,13 @@ Listed in alphabetical order. + + tmajerech + + tmajerech + + + Tom Atkins From b0aa8446048e8e834e0ba68c3c21dda3c62efd21 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 10 Jul 2023 02:34:35 +0000 Subject: [PATCH 076/157] Release 2023.07.09 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb330f6ff..eca73d002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.09 + + +### Fixed + +- Fix missing run configurations when PyCharm is selected ([#4441](https://github.com/cookiecutter/cookiecutter-django/pull/4441)) + ## 2023.07.08 diff --git a/setup.py b/setup.py index 7acc6db73..dc7ee0ea4 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.08" +version = "2023.07.09" with open("README.rst") as readme_file: long_description = readme_file.read() From dff6178b737115b593442f231427fe01fb1512e6 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 10 Jul 2023 09:01:51 -0500 Subject: [PATCH 077/157] Update sentry-sdk to 1.28.0 (#4444) --- {{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 b63fd7116..409f9c2ef 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.27.1 # https://github.com/getsentry/sentry-python +sentry-sdk==1.28.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py From ece50bacad88b224debe6cfd378b969e572e06e7 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 10 Jul 2023 09:02:14 -0500 Subject: [PATCH 078/157] Update django-cors-headers to 4.2.0 (#4445) --- {{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 47a0bc34b..59d9034c7 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -41,7 +41,7 @@ django-redis==5.3.0 # https://github.com/jazzband/django-redis {%- if cookiecutter.use_drf == 'y' %} # Django REST Framework djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework -django-cors-headers==4.1.0 # https://github.com/adamchainz/django-cors-headers +django-cors-headers==4.2.0 # https://github.com/adamchainz/django-cors-headers # DRF-spectacular for api documentation drf-spectacular==0.26.3 # https://github.com/tfranzel/drf-spectacular {%- endif %} From d794b151a239877a132e859bdfe9bae107cb9102 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 10 Jul 2023 09:23:57 -0500 Subject: [PATCH 079/157] Update pillow to 10.0.0 (#4432) --- {{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 59d9034c7..64eca4f52 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,5 +1,5 @@ python-slugify==8.0.1 # https://github.com/un33k/python-slugify -Pillow==9.5.0 # https://github.com/python-pillow/Pillow +Pillow==10.0.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 558d5282a57c16455f852bbb23839d94c791abf9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 10 Jul 2023 09:24:25 -0500 Subject: [PATCH 080/157] Update django-coverage-plugin to 3.1.0 (#4446) --- {{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 fe9231f03..0d16027df 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -45,5 +45,5 @@ factory-boy==3.2.1 # https://github.com/FactoryBoy/factory_boy django-debug-toolbar==4.1.0 # https://github.com/jazzband/django-debug-toolbar django-extensions==3.2.3 # https://github.com/django-extensions/django-extensions -django-coverage-plugin==3.0.0 # https://github.com/nedbat/django_coverage_plugin +django-coverage-plugin==3.1.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django From e0d8f3702cf1955fb122c1dd41f88ecf351349dd Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 10 Jul 2023 09:25:05 -0500 Subject: [PATCH 081/157] Update cookiecutter to 2.2.0 (#4447) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d6d0ca754..e952cd363 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cookiecutter==2.1.1 +cookiecutter==2.2.0 sh==2.0.4; sys_platform != "win32" binaryornot==0.4.4 From d19994a55a583f29c0a7bf0dc1f89b08bfe919a6 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 10 Jul 2023 09:25:59 -0500 Subject: [PATCH 082/157] Update tox to 4.6.4 (#4448) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e952cd363..0f01b4b11 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ pre-commit==3.3.3 # Testing # ------------------------------------------------------------------------------ -tox==4.6.3 +tox==4.6.4 pytest==7.4.0 pytest-xdist==3.3.1 pytest-cookies==0.7.0 From 5610d854f5ed31a23422004eb234b41250520811 Mon Sep 17 00:00:00 2001 From: tildebox <61698441+tildebox@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:20:36 +0200 Subject: [PATCH 083/157] Add missing trailing space in EMAIL_SUBJECT_PREFIX (#4434) --- {{cookiecutter.project_slug}}/config/settings/production.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index e76b63993..87340b88a 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -146,7 +146,7 @@ SERVER_EMAIL = env("DJANGO_SERVER_EMAIL", default=DEFAULT_FROM_EMAIL) # https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix EMAIL_SUBJECT_PREFIX = env( "DJANGO_EMAIL_SUBJECT_PREFIX", - default="[{{cookiecutter.project_name}}]", + default="[{{cookiecutter.project_name}}] ", ) # ADMIN From cb4d41dc9675ec3035b486ca16ec52a4618f89b7 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 10 Jul 2023 11:21:39 -0500 Subject: [PATCH 084/157] Update cookiecutter to 2.2.2 (#4449) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0f01b4b11..0611653ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cookiecutter==2.2.0 +cookiecutter==2.2.2 sh==2.0.4; sys_platform != "win32" binaryornot==0.4.4 From a82622b592b8a59da00cfbf4e8411a532bd42791 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:46:42 -0400 Subject: [PATCH 085/157] Name shown twice in user_details.html if username set to email (#4436) * Update user_detail.html * Wrap long conditions over multiple lines --------- Co-authored-by: Bruno Alla --- .../templates/users/user_detail.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_detail.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_detail.html index 4e632b015..ab36ba56b 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_detail.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/users/user_detail.html @@ -22,11 +22,17 @@ {% else %} {% raw %}{{ object.username }}{% endraw %} {% endif %} - {% raw %} - {% if object.name %}

{{ object.name }}

{% endif %} + {%- if cookiecutter.username_type == "username" %} + {%- raw %} + {% if object.name %} +

{{ object.name }}

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

Forbidden (403)

+

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

+{% endblock content %} +{%- endraw %} From 89ecc2e5764d70e9da08da55b21be8083f030c78 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 24 Jul 2023 10:36:15 -0500 Subject: [PATCH 115/157] Update drf-spectacular to 0.26.4 (#4481) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index c9813f25d..b0f47703f 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -43,7 +43,7 @@ django-redis==5.3.0 # https://github.com/jazzband/django-redis djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework django-cors-headers==4.2.0 # https://github.com/adamchainz/django-cors-headers # DRF-spectacular for api documentation -drf-spectacular==0.26.3 # https://github.com/tfranzel/drf-spectacular +drf-spectacular==0.26.4 # https://github.com/tfranzel/drf-spectacular {%- endif %} {%- if cookiecutter.frontend_pipeline == 'Webpack' %} django-webpack-loader==2.0.1 # https://github.com/django-webpack/django-webpack-loader From 64d9bd8c14551b25d1ed2df836da6b94c36c79a4 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 25 Jul 2023 02:28:58 +0000 Subject: [PATCH 116/157] Release 2023.07.24 --- CHANGELOG.md | 15 +++++++++++++++ setup.py | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ee261fda..645064266 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,21 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.24 + + +### Fixed + +- Add missing custom CRSF error page in prod ([#4464](https://github.com/cookiecutter/cookiecutter-django/pull/4464)) + +### Documentation + +- Replace `docker-compose` by `docker compose` in docs ([#4463](https://github.com/cookiecutter/cookiecutter-django/pull/4463)) + +### Updated + +- Update drf-spectacular to 0.26.4 ([#4481](https://github.com/cookiecutter/cookiecutter-django/pull/4481)) + ## 2023.07.20 diff --git a/setup.py b/setup.py index 6f4ec86be..43e1b54cf 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.20" +version = "2023.07.24" with open("README.rst") as readme_file: long_description = readme_file.read() From 72e91da973e88ead4273b2c66ca9d4004284cf8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 10:21:53 -0300 Subject: [PATCH 117/157] Bump traefik (#4483) Bumps traefik from 2.10.3 to 2.10.4. --- updated-dependencies: - dependency-name: traefik dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../compose/production/traefik/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile index bdedff720..e547dfbb8 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile @@ -1,4 +1,4 @@ -FROM traefik:2.10.3 +FROM traefik:2.10.4 RUN mkdir -p /etc/traefik/acme \ && touch /etc/traefik/acme/acme.json \ && chmod 600 /etc/traefik/acme/acme.json From 286c68c06f54db01cbebdee56e8309ca119cf519 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 26 Jul 2023 02:22:13 +0000 Subject: [PATCH 118/157] Release 2023.07.25 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 645064266..0b768dd32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.25 + + +### Updated + +- Upgrade to traefik 2.10.4 ([#4483](https://github.com/cookiecutter/cookiecutter-django/pull/4483)) + ## 2023.07.24 diff --git a/setup.py b/setup.py index 43e1b54cf..d0647dde6 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.24" +version = "2023.07.25" with open("README.rst") as readme_file: long_description = readme_file.read() From eca21f5b774e427c49989530766f9aa660c3d264 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 26 Jul 2023 09:50:16 +0100 Subject: [PATCH 119/157] Update broken link to https Fix #4484 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0a39fb084..d50537104 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ production-ready Django projects quickly. - Works with Python 3.11 - Renders Django projects with 100% starting test coverage - Twitter [Bootstrap](https://github.com/twbs/bootstrap) v5 -- [12-Factor](http://12factor.net/) based settings via [django-environ](https://github.com/joke2k/django-environ) +- [12-Factor](https://12factor.net) based settings via [django-environ](https://github.com/joke2k/django-environ) - Secure by default. We believe in SSL. - Optimized development and production settings - Registration via [django-allauth](https://github.com/pennersr/django-allauth) From 01962fb3a1f79182470431caecf79282b10e9822 Mon Sep 17 00:00:00 2001 From: hleroy Date: Thu, 27 Jul 2023 13:28:49 +0200 Subject: [PATCH 120/157] Add Webpack instructions for developping locally with HTTPS (#4486) * Add Webpack instructions for developping locally with HTTPS * Fix formatting of code blocks --------- Co-authored-by: Bruno Alla --- docs/developing-locally-docker.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index c205c852b..135e063ef 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -330,3 +330,26 @@ See `https with nginx`_ for more information on this configuration. Add ``certs/*`` to the ``.gitignore`` file. This allows the folder to be included in the repo but its contents to be ignored. *This configuration is for local development environments only. Do not use this for production since you might expose your local* ``rootCA-key.pem``. + +Webpack +~~~~~~~ + +If you are using Webpack: + +1. On the ``nginx-proxy`` service in ``local.yml``, change ``depends_on`` to ``node`` instead of ``django``. + +2. On the ``node`` service in ``local.yml``, add the following environment configuration: + + :: + + environment: + - VIRTUAL_HOST=my-dev-env.local + - VIRTUAL_PORT=3000 + +3. Add the following configuration to the ``devServer`` section of ``webpack/dev.config.js``: + + :: + + client: { + webSocketURL: 'auto://0.0.0.0:0/ws', // note the `:0` after `0.0.0.0` + }, From 7a81a561c9f5461fd62666eef528df255b28d2d3 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Thu, 27 Jul 2023 11:29:24 +0000 Subject: [PATCH 121/157] Update Contributors --- .github/contributors.json | 5 +++++ CONTRIBUTORS.md | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/.github/contributors.json b/.github/contributors.json index 4419e2620..f7f31daa4 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1423,5 +1423,10 @@ "name": "Imran Rahman", "github_login": "infraredCoding", "twitter_username": "" + }, + { + "name": "hleroy", + "github_login": "hleroy", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4941f07f7..35ab20aa4 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -936,6 +936,13 @@ Listed in alphabetical order. + + hleroy + + hleroy + + + Hoai-Thu Vuong From 0ecb9ce299c47339559480a41ba31dae00f689a6 Mon Sep 17 00:00:00 2001 From: Imran Rahman <63735892+infraredCoding@users.noreply.github.com> Date: Thu, 27 Jul 2023 19:42:04 +0600 Subject: [PATCH 122/157] Explicitly state that docker exec does not work for running management commands (#4487) Co-authored-by: Imran Rahman --- docs/developing-locally-docker.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 135e063ef..6af4fe7c2 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -77,7 +77,7 @@ As with any shell command that we wish to run in our container, this is done usi $ docker compose -f local.yml run --rm django python manage.py createsuperuser Here, ``django`` is the target service we are executing the commands against. - +Also, please note that the ``docker exec`` does not work for running management commands. (Optionally) Designate your Docker Development Server IP -------------------------------------------------------- From 4e7aff306e154f7b2b1c89caeecb7620bf1fa371 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 28 Jul 2023 02:17:48 +0000 Subject: [PATCH 123/157] Release 2023.07.27 --- CHANGELOG.md | 9 +++++++++ setup.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b768dd32..aa1242245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.27 + + +### Documentation + +- Document that `docker exec` does not work for running management commands ([#4487](https://github.com/cookiecutter/cookiecutter-django/pull/4487)) + +- Add Webpack instructions for developping locally with HTTPS ([#4486](https://github.com/cookiecutter/cookiecutter-django/pull/4486)) + ## 2023.07.25 diff --git a/setup.py b/setup.py index d0647dde6..f24a4e778 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.25" +version = "2023.07.27" with open("README.rst") as readme_file: long_description = readme_file.read() From 40ddc4b6af57c53b137981bf7b1c06c0d51c27d7 Mon Sep 17 00:00:00 2001 From: Shayan Karimi Date: Fri, 28 Jul 2023 15:33:47 +0330 Subject: [PATCH 124/157] Add support for Drone (#4382) * Add overall config for drone.io support * Update docs * Configure basic CI setup * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix python image version for tests step --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- cookiecutter.json | 2 +- docs/project-generation-options.rst | 3 ++ hooks/post_gen_project.py | 7 ++++ tests/test_cookiecutter_generation.py | 1 + {{cookiecutter.project_slug}}/.drone.yml | 48 ++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 {{cookiecutter.project_slug}}/.drone.yml diff --git a/cookiecutter.json b/cookiecutter.json index 3fcab4a78..f66e281f5 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -39,7 +39,7 @@ "use_sentry": "n", "use_whitenoise": "n", "use_heroku": "n", - "ci_tool": ["None", "Travis", "Gitlab", "Github"], + "ci_tool": ["None", "Travis", "Gitlab", "Github", "Drone"], "keep_local_envs_in_vcs": "y", "debug": "n" } diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index edf2306d4..bd368ae84 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -135,6 +135,7 @@ ci_tool: 2. `Travis CI`_ 3. `Gitlab CI`_ 4. `Github Actions`_ + 5. `Drone CI`_ keep_local_envs_in_vcs: Indicates whether the project's ``.envs/.local/`` should be kept in VCS @@ -196,4 +197,6 @@ debug: .. _GitLab CI: https://docs.gitlab.com/ee/ci/ +.. _Drone CI: https://docs.drone.io/pipeline/overview/ + .. _Github Actions: https://docs.github.com/en/actions diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index a913f7592..b2578262d 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -238,6 +238,10 @@ def remove_dotgithub_folder(): shutil.rmtree(".github") +def remove_dotdrone_file(): + os.remove(".drone.yml") + + def generate_random_string(length, using_digits=False, using_ascii_letters=False, using_punctuation=False): """ Example: @@ -491,6 +495,9 @@ def main(): if "{{ cookiecutter.ci_tool }}" != "Github": remove_dotgithub_folder() + if "{{ cookiecutter.ci_tool }}" != "Drone": + remove_dotdrone_file() + if "{{ cookiecutter.use_drf }}".lower() == "n": remove_drf_starter_files() diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 853935e8c..87e52ef01 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -127,6 +127,7 @@ SUPPORTED_COMBINATIONS = [ {"ci_tool": "Travis"}, {"ci_tool": "Gitlab"}, {"ci_tool": "Github"}, + {"ci_tool": "Drone"}, {"keep_local_envs_in_vcs": "y"}, {"keep_local_envs_in_vcs": "n"}, {"debug": "y"}, diff --git a/{{cookiecutter.project_slug}}/.drone.yml b/{{cookiecutter.project_slug}}/.drone.yml new file mode 100644 index 000000000..dc08bfbab --- /dev/null +++ b/{{cookiecutter.project_slug}}/.drone.yml @@ -0,0 +1,48 @@ +kind: pipeline +name: default + +environment: + POSTGRES_USER: '{{ cookiecutter.project_slug }}' + POSTGRES_PASSWORD: '' + POSTGRES_DB: 'test_{{ cookiecutter.project_slug }}' + POSTGRES_HOST_AUTH_METHOD: trust + {%- if cookiecutter.use_celery == 'y' %} + CELERY_BROKER_URL: 'redis://redis:6379/0' + {%- endif %} + +steps: +- name: lint + pull: if-not-exists + image: python:3.11 + environment: + PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit + volumes: + - name: pre-commit cache + path: ${PRE_COMMIT_HOME} + commands: + - export PRE_COMMIT_HOME=$CI_PROJECT_DIR/.cache/pre-commit + - pip install -q pre-commit + - pre-commit run --show-diff-on-failure --color=always --all-files + +- name: test + pull: if-not-exists + {%- if cookiecutter.use_docker == 'y' %} + image: docker/compose:1.29.2 + environment: + DATABASE_URL: pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB + commands: + - docker-compose -f local.yml build + - docker-compose -f local.yml run --rm django python manage.py migrate + - docker-compose -f local.yml up -d + - docker-compose -f local.yml run django pytest + {%- else %} + image: python:3.11 + commands: + - pip install -r requirements/local.txt + - pytest + {%- endif%} + +volumes: +- name: pre-commit cache + host: + path: /tmp/drone/cache/pre-commit From 6354f7f64f43a38ab88bf58fdffcb98721dc1c02 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Fri, 28 Jul 2023 12:04:23 +0000 Subject: [PATCH 125/157] Update Contributors --- .github/contributors.json | 5 +++++ CONTRIBUTORS.md | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/.github/contributors.json b/.github/contributors.json index f7f31daa4..51d31ea1e 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1428,5 +1428,10 @@ "name": "hleroy", "github_login": "hleroy", "twitter_username": "" + }, + { + "name": "Shayan Karimi", + "github_login": "shywn-mrk", + "twitter_username": "shywn_mrk" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 35ab20aa4..09f9d38d4 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1720,6 +1720,13 @@ Listed in alphabetical order. sebastianreyese + + Shayan Karimi + + shywn-mrk + + shywn_mrk + Simon Rey From a4c397890eb2bab001d83990c45d01eedceb27e3 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 29 Jul 2023 02:15:29 +0000 Subject: [PATCH 126/157] Release 2023.07.28 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa1242245..6c2ea2dcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.28 + + +### Changed + +- Add support for Drone CI ([#4382](https://github.com/cookiecutter/cookiecutter-django/pull/4382)) + ## 2023.07.27 diff --git a/setup.py b/setup.py index f24a4e778..67415da54 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.27" +version = "2023.07.28" with open("README.rst") as readme_file: long_description = readme_file.read() From 9eea9c894e3f0394b0ec4837a5d2e7db44ef9809 Mon Sep 17 00:00:00 2001 From: Sadra Yahyapour Date: Sun, 30 Jul 2023 14:45:06 +0330 Subject: [PATCH 127/157] README.md file extension issue fixed (#4488) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 67415da54..a0014cbe9 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ except ImportError: # We use calendar versioning version = "2023.07.28" -with open("README.rst") as readme_file: +with open("README.md") as readme_file: long_description = readme_file.read() setup( From 7b27d791fa767867ef3e338172aecc6411f87895 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sun, 30 Jul 2023 11:15:43 +0000 Subject: [PATCH 128/157] Update Contributors --- .github/contributors.json | 5 +++++ CONTRIBUTORS.md | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/.github/contributors.json b/.github/contributors.json index 51d31ea1e..c115f8912 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1433,5 +1433,10 @@ "name": "Shayan Karimi", "github_login": "shywn-mrk", "twitter_username": "shywn_mrk" + }, + { + "name": "Sadra Yahyapour", + "github_login": "lnxpy", + "twitter_username": "lnxpylnxpy" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 09f9d38d4..f5dd8cf94 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1699,6 +1699,13 @@ Listed in alphabetical order. + + Sadra Yahyapour + + lnxpy + + lnxpylnxpy + Sam Collins From 7844cfe008941f3079407d66e54cc4854b935fb5 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 31 Jul 2023 02:18:38 +0000 Subject: [PATCH 129/157] Release 2023.07.30 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c2ea2dcf..aca9023ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.07.30 + + +### Fixed + +- Fix `README.md` file extension in `setup.py` ([#4488](https://github.com/cookiecutter/cookiecutter-django/pull/4488)) + ## 2023.07.28 diff --git a/setup.py b/setup.py index a0014cbe9..bf69a61d8 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.28" +version = "2023.07.30" with open("README.md") as readme_file: long_description = readme_file.read() From 82a944bc6745f175fb72606216aa53aa56f39026 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 1 Aug 2023 08:43:38 -0500 Subject: [PATCH 130/157] Update sentry-sdk to 1.29.1 (#4494) --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 03b75a65f..7af905756 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.28.1 # https://github.com/getsentry/sentry-python +sentry-sdk==1.29.1 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py From 093b346b3db1dc3944982a698f24346c0cca7cd9 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 1 Aug 2023 08:43:51 -0500 Subject: [PATCH 131/157] Update uvicorn to 0.23.2 (#4490) --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index b0f47703f..719925eff 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -23,7 +23,7 @@ flower==2.0.0 # https://github.com/mher/flower {%- endif %} {%- endif %} {%- if cookiecutter.use_async == 'y' %} -uvicorn[standard]==0.23.1 # https://github.com/encode/uvicorn +uvicorn[standard]==0.23.2 # https://github.com/encode/uvicorn {%- endif %} # Django From d54f29fd4fa92e30bf2494d945a1e4e083294680 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 1 Aug 2023 08:44:02 -0500 Subject: [PATCH 132/157] Update flake8 to 6.1.0 (#4489) * Update flake8 from 6.0.0 to 6.1.0 * Update flake8 from 6.0.0 to 6.1.0 --- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 160e70c11..cde8904cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ binaryornot==0.4.4 # ------------------------------------------------------------------------------ black==23.7.0 isort==5.12.0 -flake8==6.0.0 +flake8==6.1.0 django-upgrade==1.14.0 djlint==1.32.1 pre-commit==3.3.3 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 569fd2331..a520aede4 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -28,7 +28,7 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ -flake8==6.0.0 # https://github.com/PyCQA/flake8 +flake8==6.1.0 # https://github.com/PyCQA/flake8 flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort coverage==7.2.7 # https://github.com/nedbat/coveragepy black==23.7.0 # https://github.com/psf/black From bc56102f1335f5e4c43df52f2e1be4128fdb460c Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 1 Aug 2023 20:56:51 +0100 Subject: [PATCH 133/157] Change how we remove prettier pre-commit hook from the config (#4450) --- hooks/post_gen_project.py | 19 +++++++++++++++++++ .../.pre-commit-config.yaml | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index b2578262d..8d1be5a16 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -207,6 +207,24 @@ def handle_js_runner(choice, use_docker, use_async): remove_gulp_files() +def remove_prettier_pre_commit(): + with open(".pre-commit-config.yaml", "r") as fd: + content = fd.readlines() + + removing = False + new_lines = [] + for line in content: + if removing and "- repo:" in line: + removing = False + if "mirrors-prettier" in line: + removing = True + if not removing: + new_lines.append(line) + + with open(".pre-commit-config.yaml", "w") as fd: + fd.writelines(new_lines) + + def remove_celery_files(): file_names = [ os.path.join("config", "celery_app.py"), @@ -465,6 +483,7 @@ def main(): remove_webpack_files() remove_sass_files() remove_packagejson_file() + remove_prettier_pre_commit() if "{{ cookiecutter.use_docker }}".lower() == "y": remove_node_dockerfile() else: diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 0d1265ac2..5f65cbe62 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -16,7 +16,6 @@ repos: - id: check-case-conflict - id: check-docstring-first - id: detect-private-key -{%- if cookiecutter.frontend_pipeline in ["Webpack", "Gulp"] %} - repo: https://github.com/pre-commit/mirrors-prettier rev: v3.0.0-alpha.9-for-vscode @@ -24,7 +23,6 @@ repos: - id: prettier args: ['--tab-width', '2', '--single-quote'] exclude: '{{cookiecutter.project_slug}}/templates/' -{%- endif %} - repo: https://github.com/adamchainz/django-upgrade rev: '1.14.0' From 072372619d0f09d6779bc204fc9dc01f93671ea5 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 1 Aug 2023 17:01:10 -0500 Subject: [PATCH 134/157] Update django from 4.2.3 to 4.2.4 (#4495) --- {{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 719925eff..50bac9671 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -28,7 +28,7 @@ uvicorn[standard]==0.23.2 # https://github.com/encode/uvicorn # Django # ------------------------------------------------------------------------------ -django==4.2.3 # pyup: < 5.0 # https://www.djangoproject.com/ +django==4.2.4 # pyup: < 5.0 # https://www.djangoproject.com/ django-environ==0.10.0 # https://github.com/joke2k/django-environ django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils django-allauth==0.54.0 # https://github.com/pennersr/django-allauth From bbfdbc8b0ebfc62978797958ecfe2a5e228717a4 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 1 Aug 2023 17:01:24 -0500 Subject: [PATCH 135/157] Update sentry-sdk from 1.29.1 to 1.29.2 (#4496) --- {{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 7af905756..6a6347ed0 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.29.1 # https://github.com/getsentry/sentry-python +sentry-sdk==1.29.2 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py From 9d33aca169996c79292a33ebf16216584596137b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 1 Aug 2023 17:02:09 -0500 Subject: [PATCH 136/157] Update django-anymail to 10.1 (#4497) * Update django-anymail from 10.0 to 10.1 * Update django-anymail from 10.0 to 10.1 * Update django-anymail from 10.0 to 10.1 * Update django-anymail from 10.0 to 10.1 * Update django-anymail from 10.0 to 10.1 * Update django-anymail from 10.0 to 10.1 * Update django-anymail from 10.0 to 10.1 * Update django-anymail from 10.0 to 10.1 * Update django-anymail from 10.0 to 10.1 --- .../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 6a6347ed0..da827e7e0 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -24,21 +24,21 @@ django-storages[google]==1.13.2 # https://github.com/jschneier/django-storages django-storages[azure]==1.13.2 # https://github.com/jschneier/django-storages {%- endif %} {%- if cookiecutter.mail_service == 'Mailgun' %} -django-anymail[mailgun]==10.0 # https://github.com/anymail/django-anymail +django-anymail[mailgun]==10.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Amazon SES' %} -django-anymail[amazon-ses]==10.0 # https://github.com/anymail/django-anymail +django-anymail[amazon-ses]==10.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Mailjet' %} -django-anymail[mailjet]==10.0 # https://github.com/anymail/django-anymail +django-anymail[mailjet]==10.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Mandrill' %} -django-anymail[mandrill]==10.0 # https://github.com/anymail/django-anymail +django-anymail[mandrill]==10.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Postmark' %} -django-anymail[postmark]==10.0 # https://github.com/anymail/django-anymail +django-anymail[postmark]==10.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Sendgrid' %} -django-anymail[sendgrid]==10.0 # https://github.com/anymail/django-anymail +django-anymail[sendgrid]==10.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'SendinBlue' %} -django-anymail[sendinblue]==10.0 # https://github.com/anymail/django-anymail +django-anymail[sendinblue]==10.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'SparkPost' %} -django-anymail[sparkpost]==10.0 # https://github.com/anymail/django-anymail +django-anymail[sparkpost]==10.1 # https://github.com/anymail/django-anymail {%- elif cookiecutter.mail_service == 'Other SMTP' %} -django-anymail==10.0 # https://github.com/anymail/django-anymail +django-anymail==10.1 # https://github.com/anymail/django-anymail {%- endif %} From 64f660b17015baa30658d4dec1dd1296923747ad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 23:02:31 +0100 Subject: [PATCH 137/157] Auto-update pre-commit hooks (#4499) Co-authored-by: browniebroke --- .pre-commit-config.yaml | 4 ++-- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 26f80b163..fd0613d0f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: args: ["--tab-width", "2"] - repo: https://github.com/asottile/pyupgrade - rev: v3.9.0 + rev: v3.10.1 hooks: - id: pyupgrade args: [--py311-plus] @@ -40,7 +40,7 @@ repos: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 5f65cbe62..14efb5e89 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: detect-private-key - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.9-for-vscode + rev: v3.0.0 hooks: - id: prettier args: ['--tab-width', '2', '--single-quote'] @@ -31,13 +31,13 @@ repos: args: ['--target-version', '4.2'] - repo: https://github.com/asottile/pyupgrade - rev: v3.7.0 + rev: v3.10.1 hooks: - id: pyupgrade args: [--py311-plus] - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black @@ -47,12 +47,12 @@ repos: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 - repo: https://github.com/Riverside-Healthcare/djLint - rev: v1.31.1 + rev: v1.32.1 hooks: - id: djlint-reformat-django - id: djlint-django From 6a391713d8acf66e6f184366c615e94a3b44c9e6 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 2 Aug 2023 02:14:43 +0000 Subject: [PATCH 138/157] Release 2023.08.01 --- CHANGELOG.md | 19 +++++++++++++++++++ setup.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aca9023ee..5a56ed6f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,25 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.08.01 + + +### Updated + +- Auto-update pre-commit hooks ([#4499](https://github.com/cookiecutter/cookiecutter-django/pull/4499)) + +- Update django-anymail to 10.1 ([#4497](https://github.com/cookiecutter/cookiecutter-django/pull/4497)) + +- Update sentry-sdk to 1.29.2 ([#4496](https://github.com/cookiecutter/cookiecutter-django/pull/4496)) + +- Update django to 4.2.4 ([#4495](https://github.com/cookiecutter/cookiecutter-django/pull/4495)) + +- Update flake8 to 6.1.0 ([#4489](https://github.com/cookiecutter/cookiecutter-django/pull/4489)) + +- Update uvicorn to 0.23.2 ([#4490](https://github.com/cookiecutter/cookiecutter-django/pull/4490)) + +- Update sentry-sdk to 1.29.1 ([#4494](https://github.com/cookiecutter/cookiecutter-django/pull/4494)) + ## 2023.07.30 diff --git a/setup.py b/setup.py index bf69a61d8..92a6b7667 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.07.30" +version = "2023.08.01" with open("README.md") as readme_file: long_description = readme_file.read() From ca99449e4af3544396c6e5af208077c8d3f58f72 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 08:22:14 +0100 Subject: [PATCH 139/157] Auto-update pre-commit hooks (#4503) 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 fd0613d0f..1c7afbd52 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: - id: detect-private-key - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.0" + rev: "v3.0.1" hooks: - id: prettier args: ["--tab-width", "2"] diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 14efb5e89..dcf5ec209 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: detect-private-key - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0 + rev: v3.0.1 hooks: - id: prettier args: ['--tab-width', '2', '--single-quote'] From 98d973f4b181bb24252d677dd046cb80d55a9118 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 4 Aug 2023 02:22:29 -0500 Subject: [PATCH 140/157] Update cookiecutter from 2.2.3 to 2.3.0 (#4502) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cde8904cd..16632a16c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cookiecutter==2.2.3 +cookiecutter==2.3.0 sh==2.0.4; sys_platform != "win32" binaryornot==0.4.4 From 39e7876ade4557b461a8780d447f4b4b8dd3edb1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 5 Aug 2023 02:15:32 +0000 Subject: [PATCH 141/157] Release 2023.08.04 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a56ed6f4..fa5f4d1a0 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.08.04 + + +### Updated + +- Auto-update pre-commit hooks ([#4503](https://github.com/cookiecutter/cookiecutter-django/pull/4503)) + ## 2023.08.01 diff --git a/setup.py b/setup.py index 92a6b7667..6122d3f0f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.08.01" +version = "2023.08.04" with open("README.md") as readme_file: long_description = readme_file.read() From 6a15b4831e03ba399e072393cb9f420382f5037b Mon Sep 17 00:00:00 2001 From: mpsantos Date: Thu, 10 Aug 2023 09:57:47 -0300 Subject: [PATCH 142/157] Corrected 'or' translation to pt-br (#4507) --- .../locale/pt_BR/LC_MESSAGES/django.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/locale/pt_BR/LC_MESSAGES/django.po b/{{cookiecutter.project_slug}}/locale/pt_BR/LC_MESSAGES/django.po index 2556abba8..1681e0f57 100644 --- a/{{cookiecutter.project_slug}}/locale/pt_BR/LC_MESSAGES/django.po +++ b/{{cookiecutter.project_slug}}/locale/pt_BR/LC_MESSAGES/django.po @@ -127,7 +127,7 @@ msgstr "Ou, cadastre-se para uma conta em %(site_ #: {{cookiecutter.project_slug}}/templates/account/login.html:32 msgid "or" -msgstr "or" +msgstr "ou" #: {{cookiecutter.project_slug}}/templates/account/login.html:41 #, python-format From 3486a93f036328b85701202cbad5a5788faab5bb Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 10 Aug 2023 07:58:18 -0500 Subject: [PATCH 143/157] Update pygithub to 1.59.1 (#4501) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 16632a16c..527b3099d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ pyyaml==6.0.1 # Scripting # ------------------------------------------------------------------------------ -PyGithub==1.59.0 +PyGithub==1.59.1 gitpython==3.1.32 jinja2==3.1.2 requests==2.31.0 From 079260320e5ecfde8f2c2c4f4aa99802bb966395 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 10 Aug 2023 07:58:36 -0500 Subject: [PATCH 144/157] Update tox to 4.7.0 (#4505) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 527b3099d..cf21b1993 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ pre-commit==3.3.3 # Testing # ------------------------------------------------------------------------------ -tox==4.6.4 +tox==4.7.0 pytest==7.4.0 pytest-xdist==3.3.1 pytest-cookies==0.7.0 From 20730611d7e16eb0476ec1e802633df2a7d8d9ea Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 10 Aug 2023 07:59:06 -0500 Subject: [PATCH 145/157] Update sh to 2.0.6 (#4508) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cf21b1993..b2c1809f9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cookiecutter==2.3.0 -sh==2.0.4; sys_platform != "win32" +sh==2.0.6; sys_platform != "win32" binaryornot==0.4.4 # Code quality From bd153d06911f7c2291e96fa0d562f0e58aada1e5 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 11 Aug 2023 02:08:04 +0000 Subject: [PATCH 146/157] Release 2023.08.10 --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa5f4d1a0..70c5c84d7 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.08.10 + + +### Fixed + +- Corrected 'or' translation to pt-br ([#4507](https://github.com/cookiecutter/cookiecutter-django/pull/4507)) + ## 2023.08.04 diff --git a/setup.py b/setup.py index 6122d3f0f..34983e0b7 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.08.04" +version = "2023.08.10" with open("README.md") as readme_file: long_description = readme_file.read() From 3415586cf733fd7e84b1642930a163ec7222f9ad Mon Sep 17 00:00:00 2001 From: Tharushan Date: Mon, 14 Aug 2023 11:50:47 +0200 Subject: [PATCH 147/157] Fix `overrideCommand` value in `devcontainer` so that the `django` container can run (#4517) --- {{cookiecutter.project_slug}}/.devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json b/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json index 6ec731ce5..393408582 100644 --- a/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json +++ b/{{cookiecutter.project_slug}}/.devcontainer/devcontainer.json @@ -24,7 +24,7 @@ ], // Tells devcontainer.json supporting services / tools whether they should run // /bin/sh -c "while sleep 1000; do :; done" when starting the container instead of the container’s default command - "overrideCommand": true, + "overrideCommand": false, "service": "django", // "remoteEnv": {"PATH": "/home/dev-user/.local/bin:${containerEnv:PATH}"}, "remoteUser": "dev-user", From d2b81ac39a7dcf25b4c15192a2e740f26f10995b Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 14 Aug 2023 09:51:28 +0000 Subject: [PATCH 148/157] 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 c115f8912..63e5d38db 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1438,5 +1438,10 @@ "name": "Sadra Yahyapour", "github_login": "lnxpy", "twitter_username": "lnxpylnxpy" + }, + { + "name": "Tharushan", + "github_login": "Tharushan", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f5dd8cf94..ed7a95c36 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1818,6 +1818,13 @@ Listed in alphabetical order. + + Tharushan + + Tharushan + + + Thibault J. From 867daa226565753b891468b191737da2e1d49040 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 14 Aug 2023 04:51:45 -0500 Subject: [PATCH 149/157] Update tox to 4.8.0 (#4515) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b2c1809f9..fbe8dfdeb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ pre-commit==3.3.3 # Testing # ------------------------------------------------------------------------------ -tox==4.7.0 +tox==4.8.0 pytest==7.4.0 pytest-xdist==3.3.1 pytest-cookies==0.7.0 From a76f43dba9f844d3e34225cdd8e1defe46a218bc Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 14 Aug 2023 04:52:57 -0500 Subject: [PATCH 150/157] Update flower to 2.0.1 (#4518) --- {{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 50bac9671..c2ef23933 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -19,7 +19,7 @@ hiredis==2.2.3 # https://github.com/redis/hiredis-py celery==5.3.1 # pyup: < 6.0 # https://github.com/celery/celery django-celery-beat==2.5.0 # https://github.com/celery/django-celery-beat {%- if cookiecutter.use_docker == 'y' %} -flower==2.0.0 # https://github.com/mher/flower +flower==2.0.1 # https://github.com/mher/flower {%- endif %} {%- endif %} {%- if cookiecutter.use_async == 'y' %} From b5b12b8f96216f9afc966cb531a4366a94c1db99 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 14 Aug 2023 04:53:14 -0500 Subject: [PATCH 151/157] Update django-debug-toolbar to 4.2.0 (#4511) --- {{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 a520aede4..b1dbbf984 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -43,7 +43,7 @@ pre-commit==3.3.3 # https://github.com/pre-commit/pre-commit # ------------------------------------------------------------------------------ factory-boy==3.3.0 # https://github.com/FactoryBoy/factory_boy -django-debug-toolbar==4.1.0 # https://github.com/jazzband/django-debug-toolbar +django-debug-toolbar==4.2.0 # https://github.com/jazzband/django-debug-toolbar django-extensions==3.2.3 # https://github.com/django-extensions/django-extensions django-coverage-plugin==3.1.0 # https://github.com/nedbat/django_coverage_plugin pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django From 7f59f85814dd0fe145fb6dbbd8007d675b5f4448 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 14 Aug 2023 04:53:37 -0500 Subject: [PATCH 152/157] Update coverage to 7.3.0 (#4516) --- {{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 b1dbbf984..accd841a2 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.1.0 # https://github.com/PyCQA/flake8 flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort -coverage==7.2.7 # https://github.com/nedbat/coveragepy +coverage==7.3.0 # https://github.com/nedbat/coveragepy black==23.7.0 # https://github.com/psf/black djlint==1.32.1 # https://github.com/Riverside-Healthcare/djLint pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django From 5d0a11b7d5f584c9d309e268f8a915b1399c1b36 Mon Sep 17 00:00:00 2001 From: Fateme Fouladkar <73009437+FatemeFouladkar@users.noreply.github.com> Date: Mon, 14 Aug 2023 13:25:28 +0330 Subject: [PATCH 153/157] Update README.md (#4514) * Update README.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d50537104..7f2c358e7 100644 --- a/README.md +++ b/README.md @@ -247,6 +247,7 @@ experience better. ## Articles +- [How to Make Your Own Django Cookiecutter Template!](https://medium.com/@FatemeFouladkar/how-to-make-your-own-django-cookiecutter-template-a753d4cbb8c2) - Aug. 10, 2023 - [Cookiecutter Django With Amazon RDS](https://haseeburrehman.com/posts/cookiecutter-django-with-amazon-rds/) - Apr, 2, 2021 - [Complete Walkthrough: Blue/Green Deployment to AWS ECS using GitHub actions](https://github.com/Andrew-Chen-Wang/cookiecutter-django-ecs-github) - June 10, 2020 - [Using cookiecutter-django with Google Cloud Storage](https://ahhda.github.io/cloud/gce/django/2019/03/12/using-django-cookiecutter-cloud-storage.html) - Mar. 12, 2019 From f89ff79aee368f9f8081b841feb5bffac95bc37a Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 14 Aug 2023 09:58:32 +0000 Subject: [PATCH 154/157] 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 63e5d38db..41ce426d7 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1443,5 +1443,10 @@ "name": "Tharushan", "github_login": "Tharushan", "twitter_username": "" + }, + { + "name": "Fateme Fouladkar", + "github_login": "FatemeFouladkar", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ed7a95c36..f81671382 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -796,6 +796,13 @@ Listed in alphabetical order. fabaff + + Fateme Fouladkar + + FatemeFouladkar + + + Felipe Arruda From bf44d152ea4eb43d2265cf2f06b2d3c5d62ad948 Mon Sep 17 00:00:00 2001 From: zhaoruibing Date: Mon, 14 Aug 2023 03:22:25 -0700 Subject: [PATCH 155/157] Exclude env files from container image (add .envs/ to .dockerignore) (#4476) Currently, environment files are copied to container image during build. Environment files contains secrets and should not be in container images. Per [discussion 4474](https://github.com/cookiecutter/cookiecutter-django/discussions/4474), this is likely a bug. This change excludes all environment files from being copied to container image. Co-authored-by: Bruno Alla --- {{cookiecutter.project_slug}}/.dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_slug}}/.dockerignore b/{{cookiecutter.project_slug}}/.dockerignore index 7369480e3..a602416cd 100644 --- a/{{cookiecutter.project_slug}}/.dockerignore +++ b/{{cookiecutter.project_slug}}/.dockerignore @@ -9,3 +9,4 @@ .travis.yml venv .git +.envs/ From 211b0571f3b1d2a69681ccf63273288f01427401 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Mon, 14 Aug 2023 10:23:06 +0000 Subject: [PATCH 156/157] 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 41ce426d7..48e9faad3 100644 --- a/.github/contributors.json +++ b/.github/contributors.json @@ -1448,5 +1448,10 @@ "name": "Fateme Fouladkar", "github_login": "FatemeFouladkar", "twitter_username": "" + }, + { + "name": "zhaoruibing", + "github_login": "zhaoruibing", + "twitter_username": "" } ] \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f81671382..38fc87e9b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -2042,6 +2042,13 @@ Listed in alphabetical order. + + zhaoruibing + + zhaoruibing + + + ### Special Thanks From cbacbb75253d0683c940b05d7e9650a1e660d768 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 14 Aug 2023 11:48:37 +0100 Subject: [PATCH 157/157] Remove unused gulp-concat when Webpack is selected (#4520) Fix #4513 --- hooks/post_gen_project.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 8d1be5a16..37f96efc0 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -183,6 +183,7 @@ def handle_js_runner(choice, use_docker, use_async): "browser-sync", "cssnano", "gulp", + "gulp-concat", "gulp-imagemin", "gulp-plumber", "gulp-postcss",