Merge branch 'master' into pyup-update-mypy-1.4.1-to-1.5.1

# Conflicts:
#	{{cookiecutter.project_slug}}/requirements/local.txt
This commit is contained in:
Bruno Alla 2023-10-05 09:11:32 +01:00
commit 5a17637de5
No known key found for this signature in database
35 changed files with 317 additions and 116 deletions

View File

@ -1463,5 +1463,15 @@
"name": "itisnotyourenv",
"github_login": "itisnotyourenv",
"twitter_username": ""
},
{
"name": "Vageeshan Mankala",
"github_login": "vagi8",
"twitter_username": ""
},
{
"name": "Jakub Boukal",
"github_login": "SukiCZ",
"twitter_username": ""
}
]

View File

@ -22,7 +22,7 @@ jobs:
name: "pytest ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
@ -53,7 +53,7 @@ jobs:
COMPOSE_DOCKER_CLI_BUILD: 1
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
@ -97,7 +97,7 @@ jobs:
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"

View File

@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"

View File

@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"

View File

@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4

View File

@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4

View File

@ -23,14 +23,14 @@ repos:
args: ["--tab-width", "2"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.14.0
hooks:
- id: pyupgrade
args: [--py311-plus]
exclude: hooks/
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black

View File

@ -3,6 +3,181 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
<!-- GENERATOR_PLACEHOLDER -->
## 2023.10.04
### Updated
- Update django to 4.2.6 ([#4617](https://github.com/cookiecutter/cookiecutter-django/pull/4617))
- Update coverage to 7.3.2 ([#4616](https://github.com/cookiecutter/cookiecutter-django/pull/4616))
- Update werkzeug to 3.0.0 ([#4608](https://github.com/cookiecutter/cookiecutter-django/pull/4608))
- Update django-redis to 5.4.0 ([#4609](https://github.com/cookiecutter/cookiecutter-django/pull/4609))
- Bump docs Python docker image from 3.11.5 to 3.11.6 ([#4615](https://github.com/cookiecutter/cookiecutter-django/pull/4615))
## 2023.10.03
### Changed
- [pre-commit.ci] pre-commit autoupdate ([#4613](https://github.com/cookiecutter/cookiecutter-django/pull/4613))
### Updated
- Bump prod Python docker image from 3.11.5 to 3.11.6 ([#4611](https://github.com/cookiecutter/cookiecutter-django/pull/4611))
- Bump local Python docker image from 3.11.5 to 3.11.6 ([#4612](https://github.com/cookiecutter/cookiecutter-django/pull/4612))
- Auto-update pre-commit hooks ([#4610](https://github.com/cookiecutter/cookiecutter-django/pull/4610))
## 2023.09.29
### Updated
- Update django-storages to 1.14.1 ([#4604](https://github.com/cookiecutter/cookiecutter-django/pull/4604))
## 2023.09.28
### Updated
- Update psycopg to 3.1.12 ([#4601](https://github.com/cookiecutter/cookiecutter-django/pull/4601))
## 2023.09.27
### Fixed
- Fix ownership for /start-flower script in production Dockerfile ([#4603](https://github.com/cookiecutter/cookiecutter-django/pull/4603))
## 2023.09.26
### Updated
- Update redis to 5.0.1 ([#4600](https://github.com/cookiecutter/cookiecutter-django/pull/4600))
## 2023.09.25
### Updated
- Update django-upgrade to 1.15.0 ([#4598](https://github.com/cookiecutter/cookiecutter-django/pull/4598))
- Update django-allauth to 0.57.0 ([#4597](https://github.com/cookiecutter/cookiecutter-django/pull/4597))
- Auto-update pre-commit hooks ([#4596](https://github.com/cookiecutter/cookiecutter-django/pull/4596))
## 2023.09.23
### Updated
- Update psycopg to 3.1.11 ([#4595](https://github.com/cookiecutter/cookiecutter-django/pull/4595))
- Auto-update pre-commit hooks ([#4591](https://github.com/cookiecutter/cookiecutter-django/pull/4591))
- Update drf-spectacular to 0.26.5 ([#4594](https://github.com/cookiecutter/cookiecutter-django/pull/4594))
## 2023.09.21
### Updated
- Auto-update pre-commit hooks ([#4589](https://github.com/cookiecutter/cookiecutter-django/pull/4589))
- Update djlint to 1.34.0 ([#4590](https://github.com/cookiecutter/cookiecutter-django/pull/4590))
## 2023.09.19
### Updated
- Auto-update pre-commit hooks ([#4588](https://github.com/cookiecutter/cookiecutter-django/pull/4588))
- Update djlint to 1.33.0 ([#4587](https://github.com/cookiecutter/cookiecutter-django/pull/4587))
## 2023.09.16
### Updated
- Auto-update pre-commit hooks ([#4586](https://github.com/cookiecutter/cookiecutter-django/pull/4586))
## 2023.09.15
### Updated
- Update flake8-isort to 6.1.0 ([#4585](https://github.com/cookiecutter/cookiecutter-django/pull/4585))
- Update pillow to 10.0.1 ([#4584](https://github.com/cookiecutter/cookiecutter-django/pull/4584))
## 2023.09.14
### Updated
- Update sphinx to 7.2.6 ([#4583](https://github.com/cookiecutter/cookiecutter-django/pull/4583))
## 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
### Updated
- Update django-allauth to 0.56.0 ([#4571](https://github.com/cookiecutter/cookiecutter-django/pull/4571))
## 2023.09.06
### Changed
- Replace Mailhog with Mailpit ([#4551](https://github.com/cookiecutter/cookiecutter-django/pull/4551))
### Updated
- Update sphinx to 7.2.5 ([#4569](https://github.com/cookiecutter/cookiecutter-django/pull/4569))
- Bump actions/checkout from 3 to 4 ([#4565](https://github.com/cookiecutter/cookiecutter-django/pull/4565))
- Update coverage to 7.3.1 ([#4567](https://github.com/cookiecutter/cookiecutter-django/pull/4567))
## 2023.09.04

View File

@ -1013,6 +1013,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Jakub Boukal</td>
<td>
<a href="https://github.com/SukiCZ">SukiCZ</a>
</td>
<td></td>
</tr>
<tr>
<td>Jakub Musko</td>
<td>
@ -1944,6 +1951,13 @@ Listed in alphabetical order.
</td>
<td>egregors</td>
</tr>
<tr>
<td>Vageeshan Mankala</td>
<td>
<a href="https://github.com/vagi8">vagi8</a>
</td>
<td></td>
</tr>
<tr>
<td>vascop</td>
<td>

View File

@ -45,7 +45,7 @@ _These features can be enabled during initial project setup._
- Serve static files from Amazon S3, Google Cloud Storage, Azure Storage or [Whitenoise](https://whitenoise.readthedocs.io/)
- Configuration for [Celery](https://docs.celeryq.dev) and [Flower](https://github.com/mher/flower) (the latter in Docker setup only)
- Integration with [MailHog](https://github.com/mailhog/MailHog) for local email testing
- Integration with [Mailpit](https://github.com/axllent/mailpit/) for local email testing
- Integration with [Sentry](https://sentry.io/welcome/) for error logging
## Constraints
@ -165,7 +165,7 @@ Answer the prompts with your own desired [options](http://cookiecutter-django.re
4 - Webpack
Choose from 1, 2, 3, 4 [1]: 1
use_celery [n]: y
use_mailhog [n]: n
use_mailpit [n]: n
use_sentry [n]: y
use_whitenoise [n]: n
use_heroku [n]: y
@ -204,6 +204,8 @@ For local development, see the following:
- If you think you found a bug or want to request a feature, please open an [issue](https://github.com/cookiecutter/cookiecutter-django/issues).
- For anything else, you can chat with us on [Discord](https://discord.gg/uFXweDQc5a).
<img src="https://opencollective.com/cookiecutter-django/contributors.svg?width=890&button=false" alt="Contributors">
## For Readers of Two Scoops of Django
You may notice that some elements of this project do not exactly match what we describe in chapter 3. The reason for that is this project, amongst other things, serves as a test bed for trying out new ideas and concepts. Sometimes they work, sometimes they don't, but the end result is that it won't necessarily match precisely what is described in the book I co-authored.

View File

@ -35,7 +35,7 @@
"use_drf": "n",
"frontend_pipeline": ["None", "Django Compressor", "Gulp", "Webpack"],
"use_celery": "n",
"use_mailhog": "n",
"use_mailpit": "n",
"use_sentry": "n",
"use_whitenoise": "n",
"use_heroku": "n",

View File

@ -191,16 +191,16 @@ The ``container_name`` from the yml file can be used to check on containers with
Notice that the ``container_name`` is generated dynamically using your project slug as a prefix
Mailhog
Mailpit
~~~~~~~
When developing locally you can go with MailHog_ for email testing provided ``use_mailhog`` was set to ``y`` on setup. To proceed,
When developing locally you can go with Mailpit_ for email testing provided ``use_mailpit`` was set to ``y`` on setup. To proceed,
#. make sure ``<project_slug>_local_mailhog`` container is up and running;
#. make sure ``<project_slug>_local_mailpit`` container is up and running;
#. open up ``http://127.0.0.1:8025``.
.. _Mailhog: https://github.com/mailhog/MailHog/
.. _Mailpit: https://github.com/axllent/mailpit/
.. _`CeleryTasks`:

View File

@ -99,39 +99,37 @@ First things first.
Setup Email Backend
-------------------
MailHog
Mailpit
~~~~~~~
.. note:: In order for the project to support MailHog_ it must have been bootstrapped with ``use_mailhog`` set to ``y``.
.. note:: In order for the project to support Mailpit_ it must have been bootstrapped with ``use_mailpit`` set to ``y``.
MailHog is used to receive emails during development, it is written in Go and has no external dependencies.
Mailpit is used to receive emails during development, it is written in Go and has no external dependencies.
For instance, one of the packages we depend upon, ``django-allauth`` sends verification emails to new users signing up as well as to the existing ones who have not yet verified themselves.
#. `Download the latest MailHog release`_ for your OS.
#. `Download the latest Mailpit release`_ for your OS.
#. Rename the build to ``MailHog``.
#. Copy the file to the project root.
#. Copy the binary file to the project root.
#. Make it executable: ::
$ chmod +x MailHog
$ chmod +x mailpit
#. Spin up another terminal window and start it there: ::
./MailHog
./mailpit
#. Check out `<http://127.0.0.1:8025/>`_ to see how it goes.
Now you have your own mail server running locally, ready to receive whatever you send it.
.. _`Download the latest MailHog release`: https://github.com/mailhog/MailHog
.. _`Download the latest Mailpit release`: https://github.com/axllent/mailpit
Console
~~~~~~~
.. note:: If you have generated your project with ``use_mailhog`` set to ``n`` this will be a default setup.
.. note:: If you have generated your project with ``use_mailpit`` set to ``n`` this will be a default setup.
Alternatively, deliver emails over console via ``EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'``.

View File

@ -115,8 +115,8 @@ Both Gulp and Webpack support Bootstrap recompilation with real-time variables a
use_celery:
Indicates whether the project should be configured to use Celery_.
use_mailhog:
Indicates whether the project should be configured to use MailHog_.
use_mailpit:
Indicates whether the project should be configured to use Mailpit_.
use_sentry:
Indicates whether the project should be configured to use Sentry_.
@ -185,7 +185,7 @@ debug:
.. _Celery: https://github.com/celery/celery
.. _MailHog: https://github.com/mailhog/MailHog
.. _Mailpit: https://github.com/axllent/mailpit
.. _Sentry: https://github.com/getsentry/sentry

View File

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

View File

@ -1,20 +1,20 @@
cookiecutter==2.3.0
cookiecutter==2.4.0
sh==2.0.6; sys_platform != "win32"
binaryornot==0.4.4
# Code quality
# ------------------------------------------------------------------------------
black==23.7.0
black==23.9.1
isort==5.12.0
flake8==6.1.0
django-upgrade==1.14.1
djlint==1.32.1
django-upgrade==1.15.0
djlint==1.34.0
pre-commit==3.4.0
# Testing
# ------------------------------------------------------------------------------
tox==4.11.1
pytest==7.4.1
tox==4.11.3
pytest==7.4.2
pytest-xdist==3.3.1
pytest-cookies==0.7.0
pytest-instafail==0.5.0
@ -22,7 +22,7 @@ pyyaml==6.0.1
# Scripting
# ------------------------------------------------------------------------------
PyGithub==1.59.1
gitpython==3.1.34
PyGithub==2.1.1
gitpython==3.1.37
jinja2==3.1.2
requests==2.31.0

View File

@ -32,6 +32,9 @@ def main() -> None:
# Group pull requests by type of change
grouped_pulls = group_pulls_by_change_type(merged_pulls)
if not any(grouped_pulls.values()):
print("Pull requests merged aren't worth a changelog mention.")
return
# Generate portion of markdown
release_changes_summary = generate_md(grouped_pulls)

View File

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

View File

@ -115,8 +115,8 @@ SUPPORTED_COMBINATIONS = [
{"frontend_pipeline": "Webpack"},
{"use_celery": "y"},
{"use_celery": "n"},
{"use_mailhog": "y"},
{"use_mailhog": "n"},
{"use_mailpit": "y"},
{"use_mailpit": "n"},
{"use_sentry": "y"},
{"use_sentry": "n"},
{"use_whitenoise": "y"},

View File

@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
@ -65,7 +65,7 @@ jobs:
steps:
- name: Checkout Code Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
{%- if cookiecutter.use_docker == 'y' %}
- name: Build the Stack

View File

@ -329,8 +329,8 @@ tags
dump.rdb
### Project template
{%- if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n' %}
MailHog
{%- if cookiecutter.use_mailpit == 'y' and cookiecutter.use_docker == 'n' %}
mailpit
{%- endif %}
{{ cookiecutter.project_slug }}/media/

View File

@ -25,19 +25,19 @@ repos:
exclude: '{{cookiecutter.project_slug}}/templates/'
- repo: https://github.com/adamchainz/django-upgrade
rev: '1.14.1'
rev: '1.15.0'
hooks:
- id: django-upgrade
args: ['--target-version', '4.2']
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.14.0
hooks:
- id: pyupgrade
args: [--py311-plus]
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black
@ -52,7 +52,7 @@ repos:
- id: flake8
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.32.1
rev: v1.34.0
hooks:
- id: djlint-reformat-django
- id: djlint-django

View File

@ -78,37 +78,35 @@ celery -A config.celery_app worker -B -l info
```
{%- endif %}
{%- if cookiecutter.use_mailhog == "y" %}
{%- if cookiecutter.use_mailpit == "y" %}
### Email Server
{%- if cookiecutter.use_docker == "y" %}
In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server [MailHog](https://github.com/mailhog/MailHog) with a web interface is available as docker container.
In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server [Mailpit](https://github.com/axllent/mailpit) with a web interface is available as docker container.
Container mailhog will start automatically when you will run all docker containers.
Container mailpit will start automatically when you will run all docker containers.
Please check [cookiecutter-django Docker documentation](http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html) for more details how to start all containers.
With MailHog running, to view messages that are sent by your application, open your browser and go to `http://127.0.0.1:8025`
With Mailpit running, to view messages that are sent by your application, open your browser and go to `http://127.0.0.1:8025`
{%- else %}
In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use [MailHog](https://github.com/mailhog/MailHog) when generating the project a local SMTP server with a web interface will be available.
In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use [Mailpit](https://github.com/axllent/mailpit) when generating the project a local SMTP server with a web interface will be available.
1. [Download the latest MailHog release](https://github.com/mailhog/MailHog/releases) for your OS.
1. [Download the latest Mailpit release](https://github.com/axllent/mailpit/releases) for your OS.
2. Rename the build to `MailHog`.
2. Copy the binary file to the project root.
3. Copy the file to the project root.
3. Make it executable:
4. Make it executable:
$ chmod +x mailpit
$ chmod +x MailHog
4. Spin up another terminal window and start it there:
5. Spin up another terminal window and start it there:
./mailpit
./MailHog
6. Check out <http://127.0.0.1:8025/> to see how it goes.
5. Check out <http://127.0.0.1:8025/> to see how it goes.
Now you have your own mail server running locally, ready to receive whatever you send it.

View File

@ -1,5 +1,5 @@
# define an alias for the specific python version used in this file.
FROM python:3.11.5-slim-bullseye as python
FROM python:3.11.6-slim-bullseye as python
# Python build stage
FROM python as python-build-stage

View File

@ -1,5 +1,5 @@
# define an alias for the specific python version used in this file.
FROM python:3.11.5-slim-bullseye as python
FROM python:3.11.6-slim-bullseye as python
# Python build stage

View File

@ -25,7 +25,7 @@ RUN npm run build
{%- endif %}
# define an alias for the specific python version used in this file.
FROM python:3.11.5-slim-bullseye as python
FROM python:3.11.6-slim-bullseye as python
# Python build stage
FROM python as python-build-stage
@ -103,7 +103,7 @@ RUN sed -i 's/\r$//g' /start-celerybeat
RUN chmod +x /start-celerybeat
COPY ./compose/production/django/celery/flower/start /start-flower
COPY --chown=django:django ./compose/production/django/celery/flower/start /start-flower
RUN sed -i 's/\r$//g' /start-flower
RUN chmod +x /start-flower
{%- endif %}

View File

@ -161,6 +161,7 @@ MIDDLEWARE = [
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"allauth.account.middleware.AccountMiddleware",
]
# STATIC

View File

@ -25,12 +25,12 @@ CACHES = {
# EMAIL
# ------------------------------------------------------------------------------
{% if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'y' -%}
{% if cookiecutter.use_mailpit == 'y' and cookiecutter.use_docker == 'y' -%}
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host
EMAIL_HOST = env("EMAIL_HOST", default="mailhog")
EMAIL_HOST = env("EMAIL_HOST", default="mailpit")
# https://docs.djangoproject.com/en/dev/ref/settings/#email-port
EMAIL_PORT = 1025
{%- elif cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n' -%}
{%- elif cookiecutter.use_mailpit == 'y' and cookiecutter.use_docker == 'n' -%}
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host
EMAIL_HOST = "localhost"
# https://docs.djangoproject.com/en/dev/ref/settings/#email-port

View File

@ -109,28 +109,28 @@ AZURE_CONTAINER = env("DJANGO_AZURE_CONTAINER_NAME")
{% if cookiecutter.use_whitenoise == 'y' -%}
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
{% 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"
STATIC_URL = f"https://{aws_s3_domain}/static/"
{% 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"
STATIC_URL = f"https://storage.googleapis.com/{GS_BUCKET_NAME}/static/"
{% 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/"
{% endif -%}
# MEDIA
# ------------------------------------------------------------------------------
{%- 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/"
{%- 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/"
{%- 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/"
{%- endif %}

View File

@ -16,8 +16,8 @@ services:
{%- if cookiecutter.use_celery == 'y' %}
- redis
{%- endif %}
{%- if cookiecutter.use_mailhog == 'y' %}
- mailhog
{%- if cookiecutter.use_mailpit == 'y' %}
- mailpit
{%- endif %}
volumes:
- .:/app:z
@ -55,11 +55,11 @@ services:
ports:
- '9000:9000'
command: /start-docs
{%- if cookiecutter.use_mailhog == 'y' %}
{%- if cookiecutter.use_mailpit == 'y' %}
mailhog:
image: mailhog/mailhog:v1.0.0
container_name: {{ cookiecutter.project_slug }}_local_mailhog
mailpit:
image: axllent/mailpit:v1.8
container_name: {{ cookiecutter.project_slug }}_local_mailpit
ports:
- "8025:8025"
@ -77,8 +77,8 @@ services:
depends_on:
- redis
- postgres
{%- if cookiecutter.use_mailhog == 'y' %}
- mailhog
{%- if cookiecutter.use_mailpit == 'y' %}
- mailpit
{%- endif %}
ports: []
command: /start-celeryworker
@ -90,8 +90,8 @@ services:
depends_on:
- redis
- postgres
{%- if cookiecutter.use_mailhog == 'y' %}
- mailhog
{%- if cookiecutter.use_mailpit == 'y' %}
- mailpit
{%- endif %}
ports: []
command: /start-celerybeat

View File

@ -1,5 +1,5 @@
python-slugify==8.0.1 # https://github.com/un33k/python-slugify
Pillow==10.0.0 # https://github.com/python-pillow/Pillow
Pillow==10.0.1 # https://github.com/python-pillow/Pillow
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
@ -11,7 +11,7 @@ argon2-cffi==23.1.0 # https://github.com/hynek/argon2_cffi
{%- if cookiecutter.use_whitenoise == 'y' %}
whitenoise==6.5.0 # https://github.com/evansd/whitenoise
{%- endif %}
redis==5.0.0 # https://github.com/redis/redis-py
redis==5.0.1 # https://github.com/redis/redis-py
{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %}
hiredis==2.2.3 # https://github.com/redis/hiredis-py
{%- endif %}
@ -28,22 +28,22 @@ uvicorn[standard]==0.23.2 # https://github.com/encode/uvicorn
# Django
# ------------------------------------------------------------------------------
django==4.2.5 # pyup: < 5.0 # https://www.djangoproject.com/
django==4.2.6 # pyup: < 5.0 # https://www.djangoproject.com/
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-allauth==0.55.2 # https://github.com/pennersr/django-allauth
django-allauth==0.57.0 # https://github.com/pennersr/django-allauth
django-crispy-forms==2.0 # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
django-compressor==4.4 # https://github.com/django-compressor/django-compressor
{%- endif %}
django-redis==5.3.0 # https://github.com/jazzband/django-redis
django-redis==5.4.0 # https://github.com/jazzband/django-redis
{%- if cookiecutter.use_drf == 'y' %}
# Django REST Framework
djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework
django-cors-headers==4.2.0 # https://github.com/adamchainz/django-cors-headers
# DRF-spectacular for api documentation
drf-spectacular==0.26.4 # https://github.com/tfranzel/drf-spectacular
drf-spectacular==0.26.5 # 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

View File

@ -1,11 +1,11 @@
-r base.txt
Werkzeug[watchdog]==2.3.7 # https://github.com/pallets/werkzeug
Werkzeug[watchdog]==3.0.0 # 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
psycopg[c]==3.1.12 # https://github.com/psycopg/psycopg
{%- else %}
psycopg[binary]==3.1.9 # https://github.com/psycopg/psycopg
psycopg[binary]==3.1.12 # https://github.com/psycopg/psycopg
{%- endif %}
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
watchfiles==0.20.0 # https://github.com/samuelcolvin/watchfiles
@ -15,7 +15,7 @@ watchfiles==0.20.0 # https://github.com/samuelcolvin/watchfiles
# ------------------------------------------------------------------------------
mypy==1.5.1 # https://github.com/python/mypy
django-stubs[compatible-mypy]==4.2.4 # 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
{%- if cookiecutter.use_drf == "y" %}
djangorestframework-stubs[compatible-mypy]==3.14.2 # https://github.com/typeddjango/djangorestframework-stubs
@ -23,16 +23,16 @@ djangorestframework-stubs[compatible-mypy]==3.14.2 # https://github.com/typeddj
# Documentation
# ------------------------------------------------------------------------------
sphinx==6.2.1 # 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
# Code quality
# ------------------------------------------------------------------------------
flake8==6.1.0 # https://github.com/PyCQA/flake8
flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort
coverage==7.3.1 # https://github.com/nedbat/coveragepy
black==23.7.0 # https://github.com/psf/black
djlint==1.32.1 # https://github.com/Riverside-Healthcare/djLint
flake8-isort==6.1.0 # https://github.com/gforcada/flake8-isort
coverage==7.3.2 # https://github.com/nedbat/coveragepy
black==23.9.1 # https://github.com/psf/black
djlint==1.34.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

View File

@ -3,12 +3,12 @@
-r base.txt
gunicorn==21.2.0 # https://github.com/benoitc/gunicorn
psycopg[c]==3.1.9 # https://github.com/psycopg/psycopg
psycopg[c]==3.1.12 # https://github.com/psycopg/psycopg
{%- if cookiecutter.use_whitenoise == 'n' %}
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
{%- endif %}
{%- 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 %}
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
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
# ------------------------------------------------------------------------------
{%- if cookiecutter.cloud_provider == 'AWS' %}
django-storages[boto3]==1.13.2 # https://github.com/jschneier/django-storages
django-storages[s3]==1.14.1 # https://github.com/jschneier/django-storages
{%- elif cookiecutter.cloud_provider == 'GCP' %}
django-storages[google]==1.13.2 # https://github.com/jschneier/django-storages
django-storages[google]==1.14.1 # https://github.com/jschneier/django-storages
{%- elif cookiecutter.cloud_provider == 'Azure' %}
django-storages[azure]==1.13.2 # https://github.com/jschneier/django-storages
django-storages[azure]==1.14.1 # https://github.com/jschneier/django-storages
{%- endif %}
{%- if cookiecutter.mail_service == 'Mailgun' %}
django-anymail[mailgun]==10.1 # https://github.com/anymail/django-anymail

View File

@ -1 +1 @@
python-3.11.5
python-3.11.6

View File

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