mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 22:44:54 +03:00
Merge branch 'cookiecutter:master' into master
This commit is contained in:
commit
c429beddf1
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -108,7 +108,7 @@ jobs:
|
|||
{{cookiecutter.project_slug}}/requirements/local.txt
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18"
|
||||
- name: Bare Metal ${{ matrix.script.name }}
|
||||
|
|
|
@ -30,7 +30,7 @@ repos:
|
|||
exclude: hooks/
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.9.1
|
||||
rev: 23.11.0
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
|
|
123
CHANGELOG.md
123
CHANGELOG.md
|
@ -3,6 +3,129 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
|
|||
|
||||
<!-- GENERATOR_PLACEHOLDER -->
|
||||
|
||||
## 2023.11.09
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Auto-update pre-commit hooks ([#4673](https://github.com/cookiecutter/cookiecutter-django/pull/4673))
|
||||
|
||||
- Update black to 23.11.0 ([#4674](https://github.com/cookiecutter/cookiecutter-django/pull/4674))
|
||||
|
||||
## 2023.11.08
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update pytest-django to 4.7.0 ([#4672](https://github.com/cookiecutter/cookiecutter-django/pull/4672))
|
||||
|
||||
## 2023.11.06
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
- Add `rmbackup` script to remove backups from `postgres/backups`. Fixes: #4663 ([#4664](https://github.com/cookiecutter/cookiecutter-django/pull/4664))
|
||||
|
||||
### Updated
|
||||
|
||||
- Update django-allauth to 0.58.2 ([#4667](https://github.com/cookiecutter/cookiecutter-django/pull/4667))
|
||||
|
||||
- Update uvicorn to 0.24.0.post1 ([#4666](https://github.com/cookiecutter/cookiecutter-django/pull/4666))
|
||||
|
||||
## 2023.11.04
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update uvicorn to 0.24.0 ([#4665](https://github.com/cookiecutter/cookiecutter-django/pull/4665))
|
||||
|
||||
## 2023.11.03
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update flake8-isort to 6.1.1 ([#4662](https://github.com/cookiecutter/cookiecutter-django/pull/4662))
|
||||
|
||||
## 2023.11.02
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update sentry-sdk to 1.34.0 ([#4660](https://github.com/cookiecutter/cookiecutter-django/pull/4660))
|
||||
|
||||
## 2023.11.01
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update django to 4.2.7 ([#4658](https://github.com/cookiecutter/cookiecutter-django/pull/4658))
|
||||
|
||||
- Update django-stubs to 4.2.6 ([#4657](https://github.com/cookiecutter/cookiecutter-django/pull/4657))
|
||||
|
||||
## 2023.10.31
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update pytest-django to 4.6.0 ([#4656](https://github.com/cookiecutter/cookiecutter-django/pull/4656))
|
||||
|
||||
- Update pytest to 7.4.3 ([#4654](https://github.com/cookiecutter/cookiecutter-django/pull/4654))
|
||||
|
||||
- Update werkzeug to 3.0.1 ([#4655](https://github.com/cookiecutter/cookiecutter-django/pull/4655))
|
||||
|
||||
- Update sentry-sdk to 1.33.1 ([#4653](https://github.com/cookiecutter/cookiecutter-django/pull/4653))
|
||||
|
||||
- Update sentry-sdk to 1.33.0 ([#4652](https://github.com/cookiecutter/cookiecutter-django/pull/4652))
|
||||
|
||||
- Update crispy-bootstrap5 to 2023.10 ([#4651](https://github.com/cookiecutter/cookiecutter-django/pull/4651))
|
||||
|
||||
## 2023.10.26
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update django-anymail to 10.2 ([#4645](https://github.com/cookiecutter/cookiecutter-django/pull/4645))
|
||||
|
||||
## 2023.10.24
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update black to 23.10.1 ([#4639](https://github.com/cookiecutter/cookiecutter-django/pull/4639))
|
||||
|
||||
- Auto-update pre-commit hooks ([#4641](https://github.com/cookiecutter/cookiecutter-django/pull/4641))
|
||||
|
||||
## 2023.10.23
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update pylint-django to 2.5.5 ([#4638](https://github.com/cookiecutter/cookiecutter-django/pull/4638))
|
||||
|
||||
## 2023.10.19
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update mypy to 1.6.1 ([#4634](https://github.com/cookiecutter/cookiecutter-django/pull/4634))
|
||||
|
||||
- Update djangorestframework-stubs to 3.14.4 ([#4637](https://github.com/cookiecutter/cookiecutter-django/pull/4637))
|
||||
|
||||
- Update django-stubs to 4.2.5 ([#4636](https://github.com/cookiecutter/cookiecutter-django/pull/4636))
|
||||
|
||||
## 2023.10.17
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Auto-update pre-commit hooks ([#4633](https://github.com/cookiecutter/cookiecutter-django/pull/4633))
|
||||
|
||||
- Update black to 23.10.0 ([#4632](https://github.com/cookiecutter/cookiecutter-django/pull/4632))
|
||||
|
||||
- Update pillow to 10.1.0 ([#4630](https://github.com/cookiecutter/cookiecutter-django/pull/4630))
|
||||
|
||||
- Update django-crispy-forms to 2.1 ([#4629](https://github.com/cookiecutter/cookiecutter-django/pull/4629))
|
||||
|
||||
## 2023.10.13
|
||||
|
||||
|
||||
|
|
|
@ -92,7 +92,15 @@ You will see something like ::
|
|||
|
||||
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
|
||||
|
||||
Remove Backup
|
||||
----------------------------------
|
||||
|
||||
To remove backup you can use the ``rmbackup`` command. This will remove the backup from the ``/backups`` directory. ::
|
||||
|
||||
$ docker compose -f local.yml exec postgres rmbackup backup_2018_03_13T09_05_07.sql.gz
|
||||
|
|
|
@ -4,7 +4,7 @@ binaryornot==0.4.4
|
|||
|
||||
# Code quality
|
||||
# ------------------------------------------------------------------------------
|
||||
black==23.9.1
|
||||
black==23.11.0
|
||||
isort==5.12.0
|
||||
flake8==6.1.0
|
||||
django-upgrade==1.15.0
|
||||
|
@ -14,7 +14,7 @@ pre-commit==3.5.0
|
|||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
tox==4.11.3
|
||||
pytest==7.4.2
|
||||
pytest==7.4.3
|
||||
pytest-xdist==3.3.1
|
||||
pytest-cookies==0.7.0
|
||||
pytest-instafail==0.5.0
|
||||
|
@ -23,6 +23,6 @@ pyyaml==6.0.1
|
|||
# Scripting
|
||||
# ------------------------------------------------------------------------------
|
||||
PyGithub==2.1.1
|
||||
gitpython==3.1.37
|
||||
gitpython==3.1.40
|
||||
jinja2==3.1.2
|
||||
requests==2.31.0
|
||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ except ImportError:
|
|||
from distutils.core import setup
|
||||
|
||||
# We use calendar versioning
|
||||
version = "2023.10.13"
|
||||
version = "2023.11.09"
|
||||
|
||||
with open("README.md") as readme_file:
|
||||
long_description = readme_file.read()
|
||||
|
|
|
@ -37,7 +37,7 @@ repos:
|
|||
args: [--py311-plus]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.9.1
|
||||
rev: 23.11.0
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
### Remove a database backup.
|
||||
###
|
||||
### Parameters:
|
||||
### <1> filename of a backup to remove.
|
||||
###
|
||||
### Usage:
|
||||
### $ docker-compose -f <environment>.yml (exec |run --rm) postgres rmbackup <1>
|
||||
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
|
||||
working_dir="$(dirname ${0})"
|
||||
source "${working_dir}/_sourced/constants.sh"
|
||||
source "${working_dir}/_sourced/messages.sh"
|
||||
|
||||
|
||||
if [[ -z ${1+x} ]]; then
|
||||
message_error "Backup filename is not specified yet it is a required parameter. Make sure you provide one and try again."
|
||||
exit 1
|
||||
fi
|
||||
backup_filename="${BACKUP_DIR_PATH}/${1}"
|
||||
if [[ ! -f "${backup_filename}" ]]; then
|
||||
message_error "No backup with the specified filename found. Check out the 'backups' maintenance script output to see if there is one and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
message_welcome "Removing the '${backup_filename}' backup file..."
|
||||
|
||||
rm -r "${backup_filename}"
|
||||
|
||||
message_success "The '${backup_filename}' database backup has been removed."
|
|
@ -1,5 +1,5 @@
|
|||
python-slugify==8.0.1 # https://github.com/un33k/python-slugify
|
||||
Pillow==10.0.1 # https://github.com/python-pillow/Pillow
|
||||
Pillow==10.1.0 # https://github.com/python-pillow/Pillow
|
||||
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
|
||||
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
|
||||
rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
|
||||
|
@ -23,17 +23,17 @@ flower==2.0.1 # https://github.com/mher/flower
|
|||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_async == 'y' %}
|
||||
uvicorn[standard]==0.23.2 # https://github.com/encode/uvicorn
|
||||
uvicorn[standard]==0.24.0.post1 # https://github.com/encode/uvicorn
|
||||
{%- endif %}
|
||||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
django==4.2.6 # pyup: < 5.0 # https://www.djangoproject.com/
|
||||
django==4.2.7 # 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.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
|
||||
django-allauth==0.58.2 # https://github.com/pennersr/django-allauth
|
||||
django-crispy-forms==2.1 # https://github.com/django-crispy-forms/django-crispy-forms
|
||||
crispy-bootstrap5==2023.10 # 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 %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-r base.txt
|
||||
|
||||
Werkzeug[watchdog]==3.0.0 # https://github.com/pallets/werkzeug
|
||||
Werkzeug[watchdog]==3.0.1 # https://github.com/pallets/werkzeug
|
||||
ipdb==0.13.13 # https://github.com/gotcha/ipdb
|
||||
{%- if cookiecutter.use_docker == 'y' %}
|
||||
psycopg[c]==3.1.12 # https://github.com/psycopg/psycopg
|
||||
|
@ -13,12 +13,12 @@ watchfiles==0.21.0 # https://github.com/samuelcolvin/watchfiles
|
|||
|
||||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
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.2 # https://github.com/pytest-dev/pytest
|
||||
mypy==1.6.1 # https://github.com/python/mypy
|
||||
django-stubs[compatible-mypy]==4.2.6 # https://github.com/typeddjango/django-stubs
|
||||
pytest==7.4.3 # 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.3 # https://github.com/typeddjango/djangorestframework-stubs
|
||||
djangorestframework-stubs[compatible-mypy]==3.14.4 # https://github.com/typeddjango/djangorestframework-stubs
|
||||
{%- endif %}
|
||||
|
||||
# Documentation
|
||||
|
@ -29,11 +29,11 @@ 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.1.0 # https://github.com/gforcada/flake8-isort
|
||||
flake8-isort==6.1.1 # https://github.com/gforcada/flake8-isort
|
||||
coverage==7.3.2 # https://github.com/nedbat/coveragepy
|
||||
black==23.9.1 # https://github.com/psf/black
|
||||
black==23.11.0 # 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
|
||||
pylint-django==2.5.5 # https://github.com/PyCQA/pylint-django
|
||||
{%- if cookiecutter.use_celery == 'y' %}
|
||||
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
|
||||
{%- endif %}
|
||||
|
@ -46,4 +46,4 @@ factory-boy==3.3.0 # https://github.com/FactoryBoy/factory_boy
|
|||
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
|
||||
pytest-django==4.7.0 # https://github.com/pytest-dev/pytest-django
|
||||
|
|
|
@ -8,7 +8,7 @@ psycopg[c]==3.1.12 # https://github.com/psycopg/psycopg
|
|||
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_sentry == "y" %}
|
||||
sentry-sdk==1.32.0 # https://github.com/getsentry/sentry-python
|
||||
sentry-sdk==1.34.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
|
||||
|
@ -24,21 +24,21 @@ django-storages[google]==1.14.2 # https://github.com/jschneier/django-storages
|
|||
django-storages[azure]==1.14.2 # https://github.com/jschneier/django-storages
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.mail_service == 'Mailgun' %}
|
||||
django-anymail[mailgun]==10.1 # https://github.com/anymail/django-anymail
|
||||
django-anymail[mailgun]==10.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Amazon SES' %}
|
||||
django-anymail[amazon-ses]==10.1 # https://github.com/anymail/django-anymail
|
||||
django-anymail[amazon-ses]==10.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Mailjet' %}
|
||||
django-anymail[mailjet]==10.1 # https://github.com/anymail/django-anymail
|
||||
django-anymail[mailjet]==10.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Mandrill' %}
|
||||
django-anymail[mandrill]==10.1 # https://github.com/anymail/django-anymail
|
||||
django-anymail[mandrill]==10.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Postmark' %}
|
||||
django-anymail[postmark]==10.1 # https://github.com/anymail/django-anymail
|
||||
django-anymail[postmark]==10.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Sendgrid' %}
|
||||
django-anymail[sendgrid]==10.1 # https://github.com/anymail/django-anymail
|
||||
django-anymail[sendgrid]==10.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'SendinBlue' %}
|
||||
django-anymail[sendinblue]==10.1 # https://github.com/anymail/django-anymail
|
||||
django-anymail[sendinblue]==10.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'SparkPost' %}
|
||||
django-anymail[sparkpost]==10.1 # https://github.com/anymail/django-anymail
|
||||
django-anymail[sparkpost]==10.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Other SMTP' %}
|
||||
django-anymail==10.1 # https://github.com/anymail/django-anymail
|
||||
django-anymail==10.2 # https://github.com/anymail/django-anymail
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user