Merge branch 'cookiecutter-master'

This commit is contained in:
Alejandro Franco 2023-09-14 16:03:45 -06:00
commit 7eb3e165ed
11 changed files with 61 additions and 29 deletions

View File

@ -30,7 +30,7 @@ repos:
exclude: hooks/ exclude: hooks/
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.7.0 rev: 23.9.1
hooks: hooks:
- id: black - id: black

View File

@ -3,6 +3,38 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
<!-- GENERATOR_PLACEHOLDER --> <!-- GENERATOR_PLACEHOLDER -->
## 2023.09.13
### Updated
- Update sentry-sdk to 1.31.0 ([#4582](https://github.com/cookiecutter/cookiecutter-django/pull/4582))
## 2023.09.12
### Updated
- Update django-storages to 1.14 ([#4564](https://github.com/cookiecutter/cookiecutter-django/pull/4564))
## 2023.09.11
### Updated
- Auto-update pre-commit hooks ([#4579](https://github.com/cookiecutter/cookiecutter-django/pull/4579))
- Update black to 23.9.1 ([#4580](https://github.com/cookiecutter/cookiecutter-django/pull/4580))
- Update django-allauth to 0.56.1 ([#4576](https://github.com/cookiecutter/cookiecutter-django/pull/4576))
## 2023.09.08
### Updated
- Update pytest to 7.4.2 ([#4573](https://github.com/cookiecutter/cookiecutter-django/pull/4573))
## 2023.09.07 ## 2023.09.07

View File

@ -1,3 +1,3 @@
sphinx==7.2.5 sphinx==7.2.6
sphinx-rtd-theme==1.3.0 sphinx-rtd-theme==1.3.0
myst-parser==2.0.0 myst-parser==2.0.0

View File

@ -4,7 +4,7 @@ binaryornot==0.4.4
# Code quality # Code quality
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
black==23.7.0 black==23.9.1
isort==5.12.0 isort==5.12.0
flake8==6.1.0 flake8==6.1.0
django-upgrade==1.14.1 django-upgrade==1.14.1
@ -13,8 +13,8 @@ pre-commit==3.4.0
# Testing # Testing
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
tox==4.11.1 tox==4.11.3
pytest==7.4.1 pytest==7.4.2
pytest-xdist==3.3.1 pytest-xdist==3.3.1
pytest-cookies==0.7.0 pytest-cookies==0.7.0
pytest-instafail==0.5.0 pytest-instafail==0.5.0
@ -23,6 +23,6 @@ pyyaml==6.0.1
# Scripting # Scripting
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
PyGithub==1.59.1 PyGithub==1.59.1
gitpython==3.1.35 gitpython==3.1.36
jinja2==3.1.2 jinja2==3.1.2
requests==2.31.0 requests==2.31.0

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 = "2023.09.07" version = "2023.09.13"
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

@ -37,7 +37,7 @@ repos:
args: [--py311-plus] args: [--py311-plus]
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.7.0 rev: 23.9.1
hooks: hooks:
- id: black - id: black

View File

@ -109,28 +109,28 @@ AZURE_CONTAINER = env("DJANGO_AZURE_CONTAINER_NAME")
{% if cookiecutter.use_whitenoise == 'y' -%} {% if cookiecutter.use_whitenoise == 'y' -%}
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
{% elif cookiecutter.cloud_provider == 'AWS' -%} {% elif cookiecutter.cloud_provider == 'AWS' -%}
STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticRootS3Boto3Storage" STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticS3Storage"
COLLECTFAST_STRATEGY = "collectfast.strategies.boto3.Boto3Strategy" COLLECTFAST_STRATEGY = "collectfast.strategies.boto3.Boto3Strategy"
STATIC_URL = f"https://{aws_s3_domain}/static/" STATIC_URL = f"https://{aws_s3_domain}/static/"
{% elif cookiecutter.cloud_provider == 'GCP' -%} {% elif cookiecutter.cloud_provider == 'GCP' -%}
STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticRootGoogleCloudStorage" STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticGoogleCloudStorage"
COLLECTFAST_STRATEGY = "collectfast.strategies.gcloud.GoogleCloudStrategy" COLLECTFAST_STRATEGY = "collectfast.strategies.gcloud.GoogleCloudStrategy"
STATIC_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/static/" STATIC_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/static/"
{% elif cookiecutter.cloud_provider == 'Azure' -%} {% elif cookiecutter.cloud_provider == 'Azure' -%}
STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticRootAzureStorage" STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticAzureStorage"
STATIC_URL = f"https://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/static/" STATIC_URL = f"https://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/static/"
{% endif -%} {% endif -%}
# MEDIA # MEDIA
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
{%- if cookiecutter.cloud_provider == 'AWS' %} {%- if cookiecutter.cloud_provider == 'AWS' %}
DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaRootS3Boto3Storage" DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaS3Storage"
MEDIA_URL = f"https://{aws_s3_domain}/media/" MEDIA_URL = f"https://{aws_s3_domain}/media/"
{%- elif cookiecutter.cloud_provider == 'GCP' %} {%- elif cookiecutter.cloud_provider == 'GCP' %}
DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaRootGoogleCloudStorage" DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaGoogleCloudStorage"
MEDIA_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/media/" MEDIA_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/media/"
{%- elif cookiecutter.cloud_provider == 'Azure' %} {%- elif cookiecutter.cloud_provider == 'Azure' %}
DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaRootAzureStorage" DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaAzureStorage"
MEDIA_URL = f"https://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/media/" MEDIA_URL = f"https://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/media/"
{%- endif %} {%- endif %}

View File

@ -31,7 +31,7 @@ uvicorn[standard]==0.23.2 # https://github.com/encode/uvicorn
django==4.2.5 # pyup: < 5.0 # https://www.djangoproject.com/ django==4.2.5 # 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.3.1 # https://github.com/jazzband/django-model-utils django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils
django-allauth==0.56.0 # https://github.com/pennersr/django-allauth django-allauth==0.56.1 # https://github.com/pennersr/django-allauth
django-crispy-forms==2.0 # https://github.com/django-crispy-forms/django-crispy-forms django-crispy-forms==2.0 # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5 crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}

View File

@ -15,7 +15,7 @@ watchfiles==0.20.0 # https://github.com/samuelcolvin/watchfiles
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
mypy==1.4.1 # https://github.com/python/mypy mypy==1.4.1 # https://github.com/python/mypy
django-stubs[compatible-mypy]==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.1 # https://github.com/pytest-dev/pytest pytest==7.4.2 # https://github.com/pytest-dev/pytest
pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar
{%- if cookiecutter.use_drf == "y" %} {%- if cookiecutter.use_drf == "y" %}
djangorestframework-stubs[compatible-mypy]==3.14.2 # https://github.com/typeddjango/djangorestframework-stubs djangorestframework-stubs[compatible-mypy]==3.14.2 # https://github.com/typeddjango/djangorestframework-stubs
@ -23,7 +23,7 @@ djangorestframework-stubs[compatible-mypy]==3.14.2 # https://github.com/typeddj
# Documentation # Documentation
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
sphinx==7.2.5 # https://github.com/sphinx-doc/sphinx sphinx==7.2.6 # https://github.com/sphinx-doc/sphinx
sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild
sphinx-rtd-theme==1.2.0 # https://pypi.org/project/sphinx-rtd-theme/ sphinx-rtd-theme==1.2.0 # https://pypi.org/project/sphinx-rtd-theme/
@ -32,7 +32,7 @@ sphinx-rtd-theme==1.2.0 # https://pypi.org/project/sphinx-rtd-theme/
flake8==6.1.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 flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort
coverage==7.3.1 # https://github.com/nedbat/coveragepy coverage==7.3.1 # https://github.com/nedbat/coveragepy
black==23.7.0 # https://github.com/psf/black black==23.9.1 # https://github.com/psf/black
djlint==1.32.1 # 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 pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django
{%- if cookiecutter.use_celery == 'y' %} {%- if cookiecutter.use_celery == 'y' %}

View File

@ -8,7 +8,7 @@ psycopg[c]==3.1.9 # 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==1.30.0 # https://github.com/getsentry/sentry-python sentry-sdk==1.31.0 # 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.2.3 # https://github.com/redis/hiredis-py hiredis==2.2.3 # https://github.com/redis/hiredis-py
@ -17,11 +17,11 @@ hiredis==2.2.3 # https://github.com/redis/hiredis-py
# Django # Django
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
{%- if cookiecutter.cloud_provider == 'AWS' %} {%- if cookiecutter.cloud_provider == 'AWS' %}
django-storages[boto3]==1.13.2 # https://github.com/jschneier/django-storages django-storages[s3]==1.14 # https://github.com/jschneier/django-storages
{%- elif cookiecutter.cloud_provider == 'GCP' %} {%- elif cookiecutter.cloud_provider == 'GCP' %}
django-storages[google]==1.13.2 # https://github.com/jschneier/django-storages django-storages[google]==1.14 # https://github.com/jschneier/django-storages
{%- elif cookiecutter.cloud_provider == 'Azure' %} {%- elif cookiecutter.cloud_provider == 'Azure' %}
django-storages[azure]==1.13.2 # https://github.com/jschneier/django-storages django-storages[azure]==1.14 # https://github.com/jschneier/django-storages
{%- endif %} {%- endif %}
{%- if cookiecutter.mail_service == 'Mailgun' %} {%- if cookiecutter.mail_service == 'Mailgun' %}
django-anymail[mailgun]==10.1 # https://github.com/anymail/django-anymail django-anymail[mailgun]==10.1 # https://github.com/anymail/django-anymail

View File

@ -1,36 +1,36 @@
{% if cookiecutter.cloud_provider == 'AWS' -%} {% if cookiecutter.cloud_provider == 'AWS' -%}
from storages.backends.s3boto3 import S3Boto3Storage from storages.backends.s3 import S3Storage
class StaticRootS3Boto3Storage(S3Boto3Storage): class StaticS3Storage(S3Storage):
location = "static" location = "static"
default_acl = "public-read" default_acl = "public-read"
class MediaRootS3Boto3Storage(S3Boto3Storage): class MediaS3Storage(S3Storage):
location = "media" location = "media"
file_overwrite = False file_overwrite = False
{%- elif cookiecutter.cloud_provider == 'GCP' -%} {%- elif cookiecutter.cloud_provider == 'GCP' -%}
from storages.backends.gcloud import GoogleCloudStorage from storages.backends.gcloud import GoogleCloudStorage
class StaticRootGoogleCloudStorage(GoogleCloudStorage): class StaticGoogleCloudStorage(GoogleCloudStorage):
location = "static" location = "static"
default_acl = "publicRead" default_acl = "publicRead"
class MediaRootGoogleCloudStorage(GoogleCloudStorage): class MediaGoogleCloudStorage(GoogleCloudStorage):
location = "media" location = "media"
file_overwrite = False file_overwrite = False
{%- elif cookiecutter.cloud_provider == 'Azure' -%} {%- elif cookiecutter.cloud_provider == 'Azure' -%}
from storages.backends.azure_storage import AzureStorage from storages.backends.azure_storage import AzureStorage
class StaticRootAzureStorage(AzureStorage): class StaticAzureStorage(AzureStorage):
location = "static" location = "static"
class MediaRootAzureStorage(AzureStorage): class MediaAzureStorage(AzureStorage):
location = "media" location = "media"
file_overwrite = False file_overwrite = False
{%- endif %} {%- endif %}