Merge branch 'master' of https://github.com/cookiecutter/cookiecutter-django into cookiecutter-master

This commit is contained in:
Alejandro Franco 2024-06-17 14:27:49 -06:00
commit 15145ed8ca
18 changed files with 97 additions and 17 deletions

2
.github/FUNDING.yml vendored
View File

@ -1,5 +1,5 @@
# These are supported funding model platforms # These are supported funding model platforms
github: [pydanny, browniebroke] github: [pydanny, browniebroke, luzfcb]
patreon: feldroy patreon: feldroy
open_collective: cookiecutter-django open_collective: cookiecutter-django

View File

@ -1593,5 +1593,10 @@
"name": "Manas Mallick", "name": "Manas Mallick",
"github_login": "ManDun", "github_login": "ManDun",
"twitter_username": "" "twitter_username": ""
},
{
"name": "Alexandr Artemyev",
"github_login": "Mogost",
"twitter_username": "MOGOST"
} }
] ]

View File

@ -43,7 +43,7 @@ repos:
- id: isort - id: isort
- repo: https://github.com/PyCQA/flake8 - repo: https://github.com/PyCQA/flake8
rev: 7.0.0 rev: 7.1.0
hooks: hooks:
- id: flake8 - id: flake8

View File

@ -3,6 +3,54 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
<!-- GENERATOR_PLACEHOLDER --> <!-- GENERATOR_PLACEHOLDER -->
## 2024.06.15
### Changed
- Update start-flower in flower to wait until all celery workers are online ([#5012](https://github.com/cookiecutter/cookiecutter-django/pull/5012))
- Enhancing the security of cookies ([#5102](https://github.com/cookiecutter/cookiecutter-django/pull/5102))
### Updated
- Update django-crispy-forms to 2.2 ([#5143](https://github.com/cookiecutter/cookiecutter-django/pull/5143))
- Update sentry-sdk to 2.5.1 ([#5142](https://github.com/cookiecutter/cookiecutter-django/pull/5142))
- Auto-update pre-commit hooks ([#5140](https://github.com/cookiecutter/cookiecutter-django/pull/5140))
- Update django-allauth to 0.63.3 ([#5111](https://github.com/cookiecutter/cookiecutter-django/pull/5111))
## 2024.06.14
### Updated
- Bump python from 3.12.3-slim-bookworm to 3.12.4-slim-bookworm in /{{cookiecutter.project_slug}}/compose/local/docs ([#5129](https://github.com/cookiecutter/cookiecutter-django/pull/5129))
- Bump python from 3.12.3-slim-bookworm to 3.12.4-slim-bookworm in /{{cookiecutter.project_slug}}/compose/local/django ([#5130](https://github.com/cookiecutter/cookiecutter-django/pull/5130))
- Bump python from 3.12.3-slim-bookworm to 3.12.4-slim-bookworm in /{{cookiecutter.project_slug}}/compose/production/django ([#5132](https://github.com/cookiecutter/cookiecutter-django/pull/5132))
- Bump amazon/aws-cli from 2.16.6 to 2.16.8 in /{{cookiecutter.project_slug}}/compose/production/aws ([#5138](https://github.com/cookiecutter/cookiecutter-django/pull/5138))
- Update ruff to 0.4.9 ([#5139](https://github.com/cookiecutter/cookiecutter-django/pull/5139))
## 2024.06.13
### Updated
- Update redis to 5.0.6 ([#5137](https://github.com/cookiecutter/cookiecutter-django/pull/5137))
## 2024.06.12
### Updated
- Bump amazon/aws-cli Docker image from 2.15.58 to 2.16.6 ([#5135](https://github.com/cookiecutter/cookiecutter-django/pull/5135))
## 2024.06.08 ## 2024.06.08

View File

@ -215,6 +215,13 @@ Listed in alphabetical order.
</td> </td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>Alexandr Artemyev</td>
<td>
<a href="https://github.com/Mogost">Mogost</a>
</td>
<td>MOGOST</td>
</tr>
<tr> <tr>
<td>Alvaro [Andor]</td> <td>Alvaro [Andor]</td>
<td> <td>

View File

@ -4,7 +4,7 @@ binaryornot==0.4.4
# Code quality # Code quality
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
ruff==0.4.8 ruff==0.4.9
django-upgrade==1.18.0 django-upgrade==1.18.0
djlint==1.34.1 djlint==1.34.1
pre-commit==3.7.1 pre-commit==3.7.1

View File

@ -5,7 +5,7 @@ except ImportError:
from distutils.core import setup from distutils.core import setup
# We use calendar versioning # We use calendar versioning
version = "2024.06.08" version = "2024.06.15"
with open("README.md") as readme_file: with open("README.md") as readme_file:
long_description = readme_file.read() long_description = readme_file.read()

View File

@ -39,7 +39,7 @@ repos:
# Run the Ruff linter. # Run the Ruff linter.
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8 rev: v0.4.9
hooks: hooks:
# Linter # Linter
- id: ruff - id: ruff

View File

@ -1,5 +1,5 @@
# define an alias for the specific python version used in this file. # define an alias for the specific python version used in this file.
FROM docker.io/python:3.12.3-slim-bookworm as python FROM docker.io/python:3.12.4-slim-bookworm as python
# Python build stage # Python build stage
FROM python as python-build-stage FROM python as python-build-stage

View File

@ -3,6 +3,14 @@
set -o errexit set -o errexit
set -o nounset set -o nounset
until timeout 10 celery -A config.celery_app inspect ping; do
>&2 echo "Celery workers not available"
done
echo 'Starting flower'
exec watchfiles --filter python celery.__main__.main \ exec watchfiles --filter python celery.__main__.main \
--args \ --args \
"-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\"" "-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\""

View File

@ -1,5 +1,5 @@
# define an alias for the specific python version used in this file. # define an alias for the specific python version used in this file.
FROM docker.io/python:3.12.3-slim-bookworm as python FROM docker.io/python:3.12.4-slim-bookworm as python
# Python build stage # Python build stage

View File

@ -1,4 +1,4 @@
FROM docker.io/amazon/aws-cli:2.15.58 FROM docker.io/amazon/aws-cli:2.16.8
COPY ./compose/production/aws/maintenance /usr/local/bin/maintenance COPY ./compose/production/aws/maintenance /usr/local/bin/maintenance
COPY ./compose/production/postgres/maintenance/_sourced /usr/local/bin/maintenance/_sourced COPY ./compose/production/postgres/maintenance/_sourced /usr/local/bin/maintenance/_sourced

View File

@ -25,7 +25,7 @@ RUN npm run build
{%- endif %} {%- endif %}
# define an alias for the specific python version used in this file. # define an alias for the specific python version used in this file.
FROM docker.io/python:3.12.3-slim-bookworm as python FROM docker.io/python:3.12.4-slim-bookworm as python
# Python build stage # Python build stage
FROM python as python-build-stage FROM python as python-build-stage

View File

@ -4,6 +4,14 @@ set -o errexit
set -o nounset set -o nounset
until timeout 10 celery -A config.celery_app inspect ping; do
>&2 echo "Celery workers not available"
done
echo 'Starting flower'
exec celery \ exec celery \
-A config.celery_app \ -A config.celery_app \
-b "${CELERY_BROKER_URL}" \ -b "${CELERY_BROKER_URL}" \

View File

@ -55,8 +55,12 @@ SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
SECURE_SSL_REDIRECT = env.bool("DJANGO_SECURE_SSL_REDIRECT", default=True) SECURE_SSL_REDIRECT = env.bool("DJANGO_SECURE_SSL_REDIRECT", default=True)
# https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-secure # https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-secure
SESSION_COOKIE_SECURE = True SESSION_COOKIE_SECURE = True
# https://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-name
SESSION_COOKIE_NAME = "__Secure-sessionid"
# https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-secure # https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-secure
CSRF_COOKIE_SECURE = True CSRF_COOKIE_SECURE = True
# https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-name
CSRF_COOKIE_NAME = "__Secure-csrftoken"
# https://docs.djangoproject.com/en/dev/topics/security/#ssl-https # https://docs.djangoproject.com/en/dev/topics/security/#ssl-https
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-seconds # https://docs.djangoproject.com/en/dev/ref/settings/#secure-hsts-seconds
# TODO: set this to 60 seconds first and then to 518400 once you prove the former works # TODO: set this to 60 seconds first and then to 518400 once you prove the former works

View File

@ -2,16 +2,16 @@ python-slugify==8.0.4 # https://github.com/un33k/python-slugify
Pillow==10.3.0 # https://github.com/python-pillow/Pillow Pillow==10.3.0 # https://github.com/python-pillow/Pillow
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %} {%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin rcssmin==1.1.2 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
{%- else %} {%- else %}
rcssmin==1.1.1 # https://github.com/ndparker/rcssmin rcssmin==1.1.2 # https://github.com/ndparker/rcssmin
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
argon2-cffi==23.1.0 # https://github.com/hynek/argon2_cffi argon2-cffi==23.1.0 # https://github.com/hynek/argon2_cffi
{%- if cookiecutter.use_whitenoise == 'y' %} {%- if cookiecutter.use_whitenoise == 'y' %}
whitenoise==6.6.0 # https://github.com/evansd/whitenoise whitenoise==6.6.0 # https://github.com/evansd/whitenoise
{%- endif %} {%- endif %}
redis==5.0.5 # https://github.com/redis/redis-py redis==5.0.6 # https://github.com/redis/redis-py
{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %}
hiredis==2.3.2 # https://github.com/redis/hiredis-py hiredis==2.3.2 # https://github.com/redis/hiredis-py
{%- endif %} {%- endif %}
@ -32,11 +32,11 @@ uvicorn-worker==0.2.0 # https://github.com/Kludex/uvicorn-worker
django==4.2.13 # pyup: < 5.0 # https://www.djangoproject.com/ django==4.2.13 # pyup: < 5.0 # https://www.djangoproject.com/
django-environ==0.11.2 # https://github.com/joke2k/django-environ django-environ==0.11.2 # https://github.com/joke2k/django-environ
django-model-utils==4.5.1 # https://github.com/jazzband/django-model-utils django-model-utils==4.5.1 # https://github.com/jazzband/django-model-utils
django-allauth[mfa]==0.63.2 # https://github.com/pennersr/django-allauth django-allauth[mfa]==0.63.3 # https://github.com/pennersr/django-allauth
django-crispy-forms==2.1 # https://github.com/django-crispy-forms/django-crispy-forms django-crispy-forms==2.2 # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5==2024.2 # https://github.com/django-crispy-forms/crispy-bootstrap5 crispy-bootstrap5==2024.2 # https://github.com/django-crispy-forms/crispy-bootstrap5
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
django-compressor==4.4 # https://github.com/django-compressor/django-compressor django-compressor==4.5 # https://github.com/django-compressor/django-compressor
{%- endif %} {%- endif %}
django-redis==5.4.0 # https://github.com/jazzband/django-redis django-redis==5.4.0 # https://github.com/jazzband/django-redis
{%- if cookiecutter.use_drf == 'y' %} {%- if cookiecutter.use_drf == 'y' %}

View File

@ -29,7 +29,7 @@ sphinx-rtd-theme==2.0.0 # https://pypi.org/project/sphinx-rtd-theme/
# Code quality # Code quality
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
ruff==0.4.8 # https://github.com/astral-sh/ruff ruff==0.4.9 # https://github.com/astral-sh/ruff
coverage==7.5.3 # https://github.com/nedbat/coveragepy coverage==7.5.3 # https://github.com/nedbat/coveragepy
djlint==1.34.1 # https://github.com/Riverside-Healthcare/djLint djlint==1.34.1 # https://github.com/Riverside-Healthcare/djLint
pre-commit==3.7.1 # https://github.com/pre-commit/pre-commit pre-commit==3.7.1 # https://github.com/pre-commit/pre-commit

View File

@ -8,7 +8,7 @@ psycopg[c]==3.1.19 # https://github.com/psycopg/psycopg
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
{%- endif %} {%- endif %}
{%- if cookiecutter.use_sentry == "y" %} {%- if cookiecutter.use_sentry == "y" %}
sentry-sdk==2.5.0 # https://github.com/getsentry/sentry-python sentry-sdk==2.5.1 # https://github.com/getsentry/sentry-python
{%- endif %} {%- endif %}
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
hiredis==2.3.2 # https://github.com/redis/hiredis-py hiredis==2.3.2 # https://github.com/redis/hiredis-py