From 69505fb7d6b709d9e030f785eb30f263623e0840 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 14 Jul 2023 02:33:10 +0000 Subject: [PATCH 01/60] 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 02/60] 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 03/60] 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 04/60] 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 05/60] 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 06/60] 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 07/60] 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 08/60] 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 09/60] 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 10/60] 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 11/60] 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 12/60] 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 13/60] 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 14/60] 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 15/60] 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 16/60] 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 17/60] 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 18/60] 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 19/60] 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 20/60] 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 21/60] 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 22/60] 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 23/60] 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 24/60] 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 25/60] 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 26/60] 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 27/60] 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 28/60] 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 29/60] 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 30/60] 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 31/60] 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 32/60] 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 33/60] 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 34/60] 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 35/60] 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 36/60] 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 37/60] 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 38/60] 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 39/60] 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 40/60] 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 41/60] 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 42/60] 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 43/60] 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 44/60] 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 45/60] 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 46/60] 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 47/60] 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 48/60] 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 49/60] 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 50/60] 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 51/60] 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 52/60] 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 53/60] 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 54/60] 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 55/60] 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 56/60] 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 57/60] 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 58/60] 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", From 4e9f9afd3d7404fc3dfb98798c001f612c99ff7a Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Mon, 14 Aug 2023 11:59:28 +0100 Subject: [PATCH 59/60] Install Django and DRF stubs with `compatible-mypy` extra (as per offical recommendation) (#4361) --- {{cookiecutter.project_slug}}/requirements/local.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index accd841a2..96bd10bf5 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -14,11 +14,11 @@ watchfiles==0.19.0 # https://github.com/samuelcolvin/watchfiles # Testing # ------------------------------------------------------------------------------ mypy==1.4.1 # https://github.com/python/mypy -django-stubs==4.2.3 # https://github.com/typeddjango/django-stubs +django-stubs[compatible-mypy]==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" %} -djangorestframework-stubs==3.14.2 # https://github.com/typeddjango/djangorestframework-stubs +djangorestframework-stubs[compatible-mypy]==3.14.2 # https://github.com/typeddjango/djangorestframework-stubs {%- endif %} # Documentation From 41d81b6286bea9c730c5fc225631daa66b5d936b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Mon, 14 Aug 2023 06:00:40 -0500 Subject: [PATCH 60/60] Update werkzeug to 2.3.7 (#4521) --- {{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 96bd10bf5..ebcfe8457 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.6 # https://github.com/pallets/werkzeug +Werkzeug[watchdog]==2.3.7 # https://github.com/pallets/werkzeug ipdb==0.13.13 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg