mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-08 22:14:53 +03:00
Merge branch 'cookiecutter:master' into main
This commit is contained in:
commit
58e7da464f
60
.github/contributors.json
vendored
60
.github/contributors.json
vendored
|
@ -1287,5 +1287,65 @@
|
||||||
"name": "Marcio Mazza",
|
"name": "Marcio Mazza",
|
||||||
"github_login": "marciomazza",
|
"github_login": "marciomazza",
|
||||||
"twitter_username": "marciomazza"
|
"twitter_username": "marciomazza"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Brandon Rumiser",
|
||||||
|
"github_login": "brumiser1550",
|
||||||
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "krati yadav",
|
||||||
|
"github_login": "krati5",
|
||||||
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Abe Hanoka",
|
||||||
|
"github_login": "abe-101",
|
||||||
|
"twitter_username": "abe__101"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Adin Hodovic",
|
||||||
|
"github_login": "adinhodovic",
|
||||||
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Leifur Halldor Asgeirsson",
|
||||||
|
"github_login": "leifurhauks",
|
||||||
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "David",
|
||||||
|
"github_login": "buckldav",
|
||||||
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rguptar",
|
||||||
|
"github_login": "rguptar",
|
||||||
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Omer-5",
|
||||||
|
"github_login": "Omer-5",
|
||||||
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TAKAHASHI Shuuji",
|
||||||
|
"github_login": "shuuji3",
|
||||||
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Thomas Booij",
|
||||||
|
"github_login": "ThomasBooij95",
|
||||||
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Pamela Fox",
|
||||||
|
"github_login": "pamelafox",
|
||||||
|
"twitter_username": "pamelafox"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Robin",
|
||||||
|
"github_login": "Kaffeetasse",
|
||||||
|
"twitter_username": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
cache: pip
|
cache: pip
|
||||||
- name: Run pre-commit
|
- name: Run pre-commit
|
||||||
uses: pre-commit/action@v3.0.0
|
uses: pre-commit/action@v3.0.0
|
||||||
|
@ -35,7 +35,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
cache: pip
|
cache: pip
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
@ -62,7 +62,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
cache: pip
|
cache: pip
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
@ -102,7 +102,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
cache: pip
|
cache: pip
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
requirements.txt
|
requirements.txt
|
||||||
|
|
2
.github/workflows/django-issue-checker.yml
vendored
2
.github/workflows/django-issue-checker.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
|
2
.github/workflows/pre-commit-autoupdate.yml
vendored
2
.github/workflows/pre-commit-autoupdate.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: Install pre-commit
|
- name: Install pre-commit
|
||||||
run: pip install pre-commit
|
run: pip install pre-commit
|
||||||
|
|
2
.github/workflows/update-changelog.yml
vendored
2
.github/workflows/update-changelog.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
|
6
.github/workflows/update-contributors.yml
vendored
6
.github/workflows/update-contributors.yml
vendored
|
@ -22,16 +22,18 @@ jobs:
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
- name: Update list
|
- name: Update list
|
||||||
run: python scripts/update_contributors.py
|
run: python scripts/update_contributors.py
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4.14.1
|
uses: stefanzweifel/git-auto-commit-action@v4.16.0
|
||||||
with:
|
with:
|
||||||
commit_message: Update Contributors
|
commit_message: Update Contributors
|
||||||
file_pattern: CONTRIBUTORS.md .github/contributors.json
|
file_pattern: CONTRIBUTORS.md .github/contributors.json
|
||||||
|
|
|
@ -3,30 +3,30 @@ default_stages: [commit]
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.3.0
|
rev: v4.4.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
|
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v2.37.3
|
rev: v3.3.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: [--py39-plus]
|
args: [--py310-plus]
|
||||||
exclude: hooks/
|
exclude: hooks/
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.8.0
|
rev: 22.12.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/isort
|
- repo: https://github.com/PyCQA/isort
|
||||||
rev: 5.10.1
|
rev: 5.11.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 5.0.4
|
rev: 6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
|
|
||||||
|
|
342
CHANGELOG.md
342
CHANGELOG.md
|
@ -3,6 +3,348 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
|
||||||
|
|
||||||
<!-- GENERATOR_PLACEHOLDER -->
|
<!-- GENERATOR_PLACEHOLDER -->
|
||||||
|
|
||||||
|
## 2023.01.10
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Add dump.rdb to gitignore ([#4062](https://github.com/cookiecutter/cookiecutter-django/pull/4062))
|
||||||
|
### Fixed
|
||||||
|
- Exclude `.venv` from code style checks ([#4069](https://github.com/cookiecutter/cookiecutter-django/pull/4069))
|
||||||
|
### Updated
|
||||||
|
- Update hiredis to 2.1.1 ([#4070](https://github.com/cookiecutter/cookiecutter-django/pull/4070))
|
||||||
|
|
||||||
|
## 2023.01.08
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update redis to 4.4.1 ([#4068](https://github.com/cookiecutter/cookiecutter-django/pull/4068))
|
||||||
|
- Update coverage to 7.0.4 ([#4067](https://github.com/cookiecutter/cookiecutter-django/pull/4067))
|
||||||
|
|
||||||
|
## 2023.01.07
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update tox to 4.2.6 ([#4064](https://github.com/cookiecutter/cookiecutter-django/pull/4064))
|
||||||
|
- Update django-storages to 1.13.2 ([#4057](https://github.com/cookiecutter/cookiecutter-django/pull/4057))
|
||||||
|
- Update isort to 5.11.4 ([#4058](https://github.com/cookiecutter/cookiecutter-django/pull/4058))
|
||||||
|
- Update rcssmin to 1.1.1 ([#4060](https://github.com/cookiecutter/cookiecutter-django/pull/4060))
|
||||||
|
- Update django-compressor to 4.3 ([#4063](https://github.com/cookiecutter/cookiecutter-django/pull/4063))
|
||||||
|
|
||||||
|
## 2023.01.06
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Add `.git` to `.dockerignore` ([#4054](https://github.com/cookiecutter/cookiecutter-django/pull/4054))
|
||||||
|
- Fix link and add non-Docker commands to testing page in the docs ([#4036](https://github.com/cookiecutter/cookiecutter-django/pull/4036))
|
||||||
|
### Updated
|
||||||
|
- Update tox to 4.2.3 ([#4051](https://github.com/cookiecutter/cookiecutter-django/pull/4051))
|
||||||
|
|
||||||
|
## 2023.01.04
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Fix typo on test settings ([#4049](https://github.com/cookiecutter/cookiecutter-django/pull/4049))
|
||||||
|
### Updated
|
||||||
|
- Update tox to 4.2.2 ([#4050](https://github.com/cookiecutter/cookiecutter-django/pull/4050))
|
||||||
|
- Update tox to 4.2.1 ([#4046](https://github.com/cookiecutter/cookiecutter-django/pull/4046))
|
||||||
|
- Update coverage to 7.0.3 ([#4047](https://github.com/cookiecutter/cookiecutter-django/pull/4047))
|
||||||
|
|
||||||
|
## 2023.01.03
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update flake8-isort to 6.0.0 ([#4022](https://github.com/cookiecutter/cookiecutter-django/pull/4022))
|
||||||
|
- Update tox to 4.1.3 ([#4041](https://github.com/cookiecutter/cookiecutter-django/pull/4041))
|
||||||
|
- Update pillow to 9.4.0 ([#4040](https://github.com/cookiecutter/cookiecutter-django/pull/4040))
|
||||||
|
- Update gitpython to 3.1.30 ([#4032](https://github.com/cookiecutter/cookiecutter-django/pull/4032))
|
||||||
|
- Update coverage to 7.0.2 ([#4042](https://github.com/cookiecutter/cookiecutter-django/pull/4042))
|
||||||
|
- Update whitenoise to 6.3.0 ([#4044](https://github.com/cookiecutter/cookiecutter-django/pull/4044))
|
||||||
|
|
||||||
|
## 2022.12.29
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update tox to 4.1.0 ([#4035](https://github.com/cookiecutter/cookiecutter-django/pull/4035))
|
||||||
|
- Update tox to 4.0.19 ([#4030](https://github.com/cookiecutter/cookiecutter-django/pull/4030))
|
||||||
|
- Update django-allauth to 0.52.0 ([#4033](https://github.com/cookiecutter/cookiecutter-django/pull/4033))
|
||||||
|
|
||||||
|
## 2022.12.26
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update tox to 4.0.17 ([#4027](https://github.com/cookiecutter/cookiecutter-django/pull/4027))
|
||||||
|
- Update pre-commit to 2.21.0 ([#4026](https://github.com/cookiecutter/cookiecutter-django/pull/4026))
|
||||||
|
|
||||||
|
## 2022.12.25
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Auto-update pre-commit hooks ([#4021](https://github.com/cookiecutter/cookiecutter-django/pull/4021))
|
||||||
|
|
||||||
|
## 2022.12.24
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update coverage to 7.0.1 ([#4024](https://github.com/cookiecutter/cookiecutter-django/pull/4024))
|
||||||
|
|
||||||
|
## 2022.12.21
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Retry when trying to store a Celery result in backend ([#3996](https://github.com/cookiecutter/cookiecutter-django/pull/3996))
|
||||||
|
- Update image URL for build status shield badge ([#4018](https://github.com/cookiecutter/cookiecutter-django/pull/4018))
|
||||||
|
### Updated
|
||||||
|
- Update pytz to 2022.7 ([#4020](https://github.com/cookiecutter/cookiecutter-django/pull/4020))
|
||||||
|
- Update ipdb to 0.13.11 ([#4019](https://github.com/cookiecutter/cookiecutter-django/pull/4019))
|
||||||
|
- Update tox to 4.0.16 ([#4017](https://github.com/cookiecutter/cookiecutter-django/pull/4017))
|
||||||
|
- Update sentry-sdk to 1.12.1 ([#4014](https://github.com/cookiecutter/cookiecutter-django/pull/4014))
|
||||||
|
- Update coverage to 7.0.0 ([#4013](https://github.com/cookiecutter/cookiecutter-django/pull/4013))
|
||||||
|
- Update django-anymail to 9.0 ([#4012](https://github.com/cookiecutter/cookiecutter-django/pull/4012))
|
||||||
|
- Auto-update pre-commit hooks ([#4005](https://github.com/cookiecutter/cookiecutter-django/pull/4005))
|
||||||
|
- Update isort to 5.11.3 ([#4010](https://github.com/cookiecutter/cookiecutter-django/pull/4010))
|
||||||
|
- Update drf-spectacular to 0.25.1 ([#4009](https://github.com/cookiecutter/cookiecutter-django/pull/4009))
|
||||||
|
- Update hiredis to 2.1.0 ([#4006](https://github.com/cookiecutter/cookiecutter-django/pull/4006))
|
||||||
|
|
||||||
|
## 2022.12.13
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Improve documentation for Getting started with Docker ([#4003](https://github.com/cookiecutter/cookiecutter-django/pull/4003))
|
||||||
|
### Updated
|
||||||
|
- Update isort to 5.11.1 ([#3999](https://github.com/cookiecutter/cookiecutter-django/pull/3999))
|
||||||
|
- Auto-update pre-commit hooks ([#3998](https://github.com/cookiecutter/cookiecutter-django/pull/3998))
|
||||||
|
- Update isort to 5.11.0 ([#3997](https://github.com/cookiecutter/cookiecutter-django/pull/3997))
|
||||||
|
|
||||||
|
## 2022.12.10
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update tox to 4.0.5 ([#3993](https://github.com/cookiecutter/cookiecutter-django/pull/3993))
|
||||||
|
- Auto-update pre-commit hooks ([#3991](https://github.com/cookiecutter/cookiecutter-django/pull/3991))
|
||||||
|
|
||||||
|
## 2022.12.09
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Remove bind option mounts for docker compose volumes ([#3981](https://github.com/cookiecutter/cookiecutter-django/pull/3981))
|
||||||
|
### Updated
|
||||||
|
- Update djangorestframework-stubs to 1.8.0 ([#3990](https://github.com/cookiecutter/cookiecutter-django/pull/3990))
|
||||||
|
- Update black to 22.12.0 ([#3988](https://github.com/cookiecutter/cookiecutter-django/pull/3988))
|
||||||
|
|
||||||
|
## 2022.12.08
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update tox to 4.0.3 ([#3987](https://github.com/cookiecutter/cookiecutter-django/pull/3987))
|
||||||
|
- Update tox to 4.0.2 ([#3985](https://github.com/cookiecutter/cookiecutter-django/pull/3985))
|
||||||
|
- Update django-stubs to 1.13.1 ([#3986](https://github.com/cookiecutter/cookiecutter-django/pull/3986))
|
||||||
|
|
||||||
|
## 2022.12.07
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Auto-update pre-commit hooks ([#3983](https://github.com/cookiecutter/cookiecutter-django/pull/3983))
|
||||||
|
|
||||||
|
## 2022.12.06
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Simplify production `DATABASES` setting to extend base definition ([#3969](https://github.com/cookiecutter/cookiecutter-django/pull/3969))
|
||||||
|
### Fixed
|
||||||
|
- Only set `SERVERS` for `drf-spectacular` in production ([#3609](https://github.com/cookiecutter/cookiecutter-django/pull/3609))
|
||||||
|
### Updated
|
||||||
|
- Update django-coverage-plugin to 3.0.0 ([#3979](https://github.com/cookiecutter/cookiecutter-django/pull/3979))
|
||||||
|
- Bump stefanzweifel/git-auto-commit-action from 4.15.4 to 4.16.0 ([#3978](https://github.com/cookiecutter/cookiecutter-django/pull/3978))
|
||||||
|
|
||||||
|
## 2022.12.04
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update redis to 4.4.0 ([#3977](https://github.com/cookiecutter/cookiecutter-django/pull/3977))
|
||||||
|
- Update django-debug-toolbar to 3.8.1 ([#3976](https://github.com/cookiecutter/cookiecutter-django/pull/3976))
|
||||||
|
|
||||||
|
## 2022.12.03
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Auto-update pre-commit hooks ([#3975](https://github.com/cookiecutter/cookiecutter-django/pull/3975))
|
||||||
|
|
||||||
|
## 2022.12.02
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update flake8 to 6.0.0 ([#3974](https://github.com/cookiecutter/cookiecutter-django/pull/3974))
|
||||||
|
|
||||||
|
## 2022.11.30
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Add Azure Storage as an option to serve static and media files ([#3967](https://github.com/cookiecutter/cookiecutter-django/pull/3967))
|
||||||
|
### Updated
|
||||||
|
- Auto-update pre-commit hooks ([#3970](https://github.com/cookiecutter/cookiecutter-django/pull/3970))
|
||||||
|
|
||||||
|
## 2022.11.26
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Fix typo in flower start for watching celery ([#3966](https://github.com/cookiecutter/cookiecutter-django/pull/3966))
|
||||||
|
|
||||||
|
## 2022.11.24
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Auto-update pre-commit hooks ([#3963](https://github.com/cookiecutter/cookiecutter-django/pull/3963))
|
||||||
|
|
||||||
|
## 2022.11.23
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Fix graceful shutdown of local dev containers and use watchfiles for beat + flower ([#3925](https://github.com/cookiecutter/cookiecutter-django/pull/3925))
|
||||||
|
- feat(celery): Enable sending the sent task event by default ([#3961](https://github.com/cookiecutter/cookiecutter-django/pull/3961))
|
||||||
|
### Updated
|
||||||
|
- Bump stefanzweifel/git-auto-commit-action from 4.15.3 to 4.15.4 ([#3940](https://github.com/cookiecutter/cookiecutter-django/pull/3940))
|
||||||
|
- Update django-model-utils to 4.3.1 ([#3948](https://github.com/cookiecutter/cookiecutter-django/pull/3948))
|
||||||
|
- Update flake8-isort to 5.0.3 ([#3952](https://github.com/cookiecutter/cookiecutter-django/pull/3952))
|
||||||
|
|
||||||
|
## 2022.11.22
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Remove USE_L10N due to deprecation ([#3960](https://github.com/cookiecutter/cookiecutter-django/pull/3960))
|
||||||
|
- Remove platform from compose file ([#3957](https://github.com/cookiecutter/cookiecutter-django/pull/3957))
|
||||||
|
- feat(celery): Send task events for Celery by default ([#3959](https://github.com/cookiecutter/cookiecutter-django/pull/3959))
|
||||||
|
### Updated
|
||||||
|
- Update python-slugify to 7.0.0 ([#3950](https://github.com/cookiecutter/cookiecutter-django/pull/3950))
|
||||||
|
- Update redis to 4.3.5 ([#3954](https://github.com/cookiecutter/cookiecutter-django/pull/3954))
|
||||||
|
- Update sentry-sdk to 1.11.1 ([#3955](https://github.com/cookiecutter/cookiecutter-django/pull/3955))
|
||||||
|
- Update uvicorn to 0.20.0 ([#3953](https://github.com/cookiecutter/cookiecutter-django/pull/3953))
|
||||||
|
- Update tox to 3.27.1 ([#3945](https://github.com/cookiecutter/cookiecutter-django/pull/3945))
|
||||||
|
|
||||||
|
## 2022.11.11
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Auto-update pre-commit hooks ([#3942](https://github.com/cookiecutter/cookiecutter-django/pull/3942))
|
||||||
|
|
||||||
|
## 2022.11.07
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update watchfiles to 0.18.1 ([#3938](https://github.com/cookiecutter/cookiecutter-django/pull/3938))
|
||||||
|
|
||||||
|
## 2022.11.06
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Store extended Celery task attributes in backend ([#3855](https://github.com/cookiecutter/cookiecutter-django/pull/3855))
|
||||||
|
- add os requirements for Ubuntu 22.04 (Jammy) ([#3930](https://github.com/cookiecutter/cookiecutter-django/pull/3930))
|
||||||
|
### Updated
|
||||||
|
- Update pytest-sugar to 0.9.6 ([#3937](https://github.com/cookiecutter/cookiecutter-django/pull/3937))
|
||||||
|
- Update pygithub to 1.57 ([#3936](https://github.com/cookiecutter/cookiecutter-django/pull/3936))
|
||||||
|
- Update sphinx-rtd-theme to 1.1.1 ([#3935](https://github.com/cookiecutter/cookiecutter-django/pull/3935))
|
||||||
|
|
||||||
|
## 2022.11.02
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- fix typo in CONTRIBUTING.md ([#3932](https://github.com/cookiecutter/cookiecutter-django/pull/3932))
|
||||||
|
### Updated
|
||||||
|
- Update crispy-bootstrap5 to 0.7 ([#3886](https://github.com/cookiecutter/cookiecutter-django/pull/3886))
|
||||||
|
- Update django-coverage-plugin to 2.0.4 ([#3927](https://github.com/cookiecutter/cookiecutter-django/pull/3927))
|
||||||
|
- Update pytz to 2022.6 ([#3928](https://github.com/cookiecutter/cookiecutter-django/pull/3928))
|
||||||
|
- Update sphinx-rtd-theme to 1.1.0 ([#3929](https://github.com/cookiecutter/cookiecutter-django/pull/3929))
|
||||||
|
- Update pillow to 9.3.0 ([#3922](https://github.com/cookiecutter/cookiecutter-django/pull/3922))
|
||||||
|
|
||||||
|
## 2022.10.30
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Auto-update pre-commit hooks ([#3924](https://github.com/cookiecutter/cookiecutter-django/pull/3924))
|
||||||
|
|
||||||
|
## 2022.10.28
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Bump stefanzweifel/git-auto-commit-action from 4.15.2 to 4.15.3 ([#3921](https://github.com/cookiecutter/cookiecutter-django/pull/3921))
|
||||||
|
|
||||||
|
## 2022.10.26
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update uvicorn to 0.19.0 ([#3920](https://github.com/cookiecutter/cookiecutter-django/pull/3920))
|
||||||
|
- Update pytest to 7.2.0 ([#3919](https://github.com/cookiecutter/cookiecutter-django/pull/3919))
|
||||||
|
- Update tox to 3.27.0 ([#3917](https://github.com/cookiecutter/cookiecutter-django/pull/3917))
|
||||||
|
- Update psycopg2 to 2.9.5 ([#3918](https://github.com/cookiecutter/cookiecutter-django/pull/3918))
|
||||||
|
|
||||||
|
## 2022.10.24
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Upgrade Python version from 3.9 to 3.10 ([#3913](https://github.com/cookiecutter/cookiecutter-django/pull/3913))
|
||||||
|
### Updated
|
||||||
|
- Update sentry-sdk to 1.10.1 ([#3911](https://github.com/cookiecutter/cookiecutter-django/pull/3911))
|
||||||
|
- Bump stefanzweifel/git-auto-commit-action from 4.15.1 to 4.15.2 ([#3914](https://github.com/cookiecutter/cookiecutter-django/pull/3914))
|
||||||
|
|
||||||
|
## 2022.10.19
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Set AWS_S3_MAX_MEMORY_SIZE ([#3810](https://github.com/cookiecutter/cookiecutter-django/pull/3810))
|
||||||
|
- Upgrade to Django 4.0 ([#3848](https://github.com/cookiecutter/cookiecutter-django/pull/3848))
|
||||||
|
### Updated
|
||||||
|
- Update pytz to 2022.5 ([#3906](https://github.com/cookiecutter/cookiecutter-django/pull/3906))
|
||||||
|
- Update sphinx to 5.3.0 ([#3905](https://github.com/cookiecutter/cookiecutter-django/pull/3905))
|
||||||
|
- Update django-celery-beat to 2.4.0 ([#3908](https://github.com/cookiecutter/cookiecutter-django/pull/3908))
|
||||||
|
- Update watchfiles to 0.18.0 ([#3907](https://github.com/cookiecutter/cookiecutter-django/pull/3907))
|
||||||
|
|
||||||
|
## 2022.10.13
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update pygithub to 1.56 ([#3904](https://github.com/cookiecutter/cookiecutter-django/pull/3904))
|
||||||
|
|
||||||
|
## 2022.10.11
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Auto-update pre-commit hooks ([#3899](https://github.com/cookiecutter/cookiecutter-django/pull/3899))
|
||||||
|
- Update flake8-isort to 5.0.0 ([#3901](https://github.com/cookiecutter/cookiecutter-django/pull/3901))
|
||||||
|
- Update gitpython to 3.1.29 ([#3902](https://github.com/cookiecutter/cookiecutter-django/pull/3902))
|
||||||
|
- Update psycopg2 to 2.9.4 ([#3896](https://github.com/cookiecutter/cookiecutter-django/pull/3896))
|
||||||
|
- Bump stefanzweifel/git-auto-commit-action from 4.15.0 to 4.15.1 ([#3903](https://github.com/cookiecutter/cookiecutter-django/pull/3903))
|
||||||
|
- Update black to 22.10.0 ([#3898](https://github.com/cookiecutter/cookiecutter-django/pull/3898))
|
||||||
|
|
||||||
|
## 2022.10.04
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update django to 3.2.16 ([#3895](https://github.com/cookiecutter/cookiecutter-django/pull/3895))
|
||||||
|
- Update mypy to 0.982 ([#3893](https://github.com/cookiecutter/cookiecutter-django/pull/3893))
|
||||||
|
- Auto-update pre-commit hooks ([#3894](https://github.com/cookiecutter/cookiecutter-django/pull/3894))
|
||||||
|
|
||||||
|
## 2022.10.03
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update sentry-sdk to 1.9.10 ([#3892](https://github.com/cookiecutter/cookiecutter-django/pull/3892))
|
||||||
|
|
||||||
|
## 2022.10.02
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update pytz to 2022.4 ([#3891](https://github.com/cookiecutter/cookiecutter-django/pull/3891))
|
||||||
|
|
||||||
|
## 2022.09.30
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update coverage to 6.5.0 ([#3890](https://github.com/cookiecutter/cookiecutter-django/pull/3890))
|
||||||
|
- Update mypy to 0.981 ([#3889](https://github.com/cookiecutter/cookiecutter-django/pull/3889))
|
||||||
|
- Update sentry-sdk to 1.9.9 ([#3888](https://github.com/cookiecutter/cookiecutter-django/pull/3888))
|
||||||
|
- Update sphinx to 5.2.3 ([#3887](https://github.com/cookiecutter/cookiecutter-django/pull/3887))
|
||||||
|
|
||||||
|
## 2022.09.29
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Remove outdated & optional Sendgrid settings from production config ([#3885](https://github.com/cookiecutter/cookiecutter-django/pull/3885))
|
||||||
|
|
||||||
|
## 2022.09.27
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update sphinx to 5.2.2 ([#3884](https://github.com/cookiecutter/cookiecutter-django/pull/3884))
|
||||||
|
|
||||||
|
## 2022.09.26
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update drf-spectacular to 0.24.2 ([#3882](https://github.com/cookiecutter/cookiecutter-django/pull/3882))
|
||||||
|
- Update djangorestframework to 3.14.0 ([#3881](https://github.com/cookiecutter/cookiecutter-django/pull/3881))
|
||||||
|
- Update django-debug-toolbar to 3.7.0 ([#3878](https://github.com/cookiecutter/cookiecutter-django/pull/3878))
|
||||||
|
- Auto-update pre-commit hooks ([#3877](https://github.com/cookiecutter/cookiecutter-django/pull/3877))
|
||||||
|
- Bump stefanzweifel/git-auto-commit-action from 4.14.1 to 4.15.0 ([#3880](https://github.com/cookiecutter/cookiecutter-django/pull/3880))
|
||||||
|
- Update sphinx to 5.2.1 ([#3879](https://github.com/cookiecutter/cookiecutter-django/pull/3879))
|
||||||
|
|
||||||
|
## 2022.09.24
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Remove `--no-deps` in pip wheels command of docs Dockerfile ([#3875](https://github.com/cookiecutter/cookiecutter-django/pull/3875))
|
||||||
|
|
||||||
|
## 2022.09.23
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Reload uvicorn on html file change ([#3866](https://github.com/cookiecutter/cookiecutter-django/pull/3866))
|
||||||
|
- Mailjet default api url does not work out of the box ([#3871](https://github.com/cookiecutter/cookiecutter-django/pull/3871))
|
||||||
|
### Updated
|
||||||
|
- Auto-update pre-commit hooks ([#3872](https://github.com/cookiecutter/cookiecutter-django/pull/3872))
|
||||||
|
- Update django-extensions to 3.2.1 ([#3867](https://github.com/cookiecutter/cookiecutter-django/pull/3867))
|
||||||
|
- Update tox to 3.26.0 ([#3864](https://github.com/cookiecutter/cookiecutter-django/pull/3864))
|
||||||
|
- Update drf-spectacular to 0.24.1 ([#3874](https://github.com/cookiecutter/cookiecutter-django/pull/3874))
|
||||||
|
|
||||||
|
## 2022.09.15
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update watchfiles to 0.17.0 ([#3869](https://github.com/cookiecutter/cookiecutter-django/pull/3869))
|
||||||
|
- Update drf-spectacular to 0.24.0 ([#3870](https://github.com/cookiecutter/cookiecutter-django/pull/3870))
|
||||||
|
|
||||||
## 2022.09.05
|
## 2022.09.05
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
|
|
|
@ -33,9 +33,9 @@ To run all tests using various versions of python in virtualenvs defined in tox.
|
||||||
It is possible to test with a specific version of python. To do this, the command
|
It is possible to test with a specific version of python. To do this, the command
|
||||||
is:
|
is:
|
||||||
|
|
||||||
$ tox -e py39
|
$ tox -e py310
|
||||||
|
|
||||||
This will run pytest with the python3.9 interpreter, for example.
|
This will run pytest with the python3.10 interpreter, for example.
|
||||||
|
|
||||||
To run a particular test with tox for against your current Python version:
|
To run a particular test with tox for against your current Python version:
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td>abdadeel_</td>
|
<td>abdadeel_</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Abe Hanoka</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/abe-101">abe-101</a>
|
||||||
|
</td>
|
||||||
|
<td>abe__101</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Adam Bogdał</td>
|
<td>Adam Bogdał</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -159,6 +166,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Adin Hodovic</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/adinhodovic">adinhodovic</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Agam Dua</td>
|
<td>Agam Dua</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -376,6 +390,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Brandon Rumiser</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/brumiser1550">brumiser1550</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Brent Payne</td>
|
<td>Brent Payne</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -586,6 +607,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>David</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/buckldav">buckldav</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>David Díaz</td>
|
<td>David Díaz</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -1097,6 +1125,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>krati yadav</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/krati5">krati5</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Krzysztof Szumny</td>
|
<td>Krzysztof Szumny</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -1132,6 +1167,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Leifur Halldor Asgeirsson</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/leifurhauks">leifurhauks</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Leo won</td>
|
<td>Leo won</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -1405,6 +1447,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Omer-5</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/Omer-5">Omer-5</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Pablo</td>
|
<td>Pablo</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -1412,6 +1461,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Pamela Fox</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/pamelafox">pamelafox</a>
|
||||||
|
</td>
|
||||||
|
<td>pamelafox</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Parbhat Puri</td>
|
<td>Parbhat Puri</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -1503,6 +1559,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>rguptar</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/rguptar">rguptar</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Richard Hajdu</td>
|
<td>Richard Hajdu</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -1510,6 +1573,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Robin</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/Kaffeetasse">Kaffeetasse</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Roman Afanaskin</td>
|
<td>Roman Afanaskin</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -1615,6 +1685,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>TAKAHASHI Shuuji</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/shuuji3">shuuji3</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Tames McTigue</td>
|
<td>Tames McTigue</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -1643,6 +1720,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td>thibault</td>
|
<td>thibault</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Thomas Booij</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/ThomasBooij95">ThomasBooij95</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Théo Segonds</td>
|
<td>Théo Segonds</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
10
README.md
10
README.md
|
@ -1,6 +1,6 @@
|
||||||
# Cookiecutter Django
|
# Cookiecutter Django
|
||||||
|
|
||||||
[](https://github.com/cookiecutter/cookiecutter-django/actions?query=workflow%3ACI)
|
[](https://github.com/cookiecutter/cookiecutter-django/actions/workflows/ci.yml?query=branch%3Amaster)
|
||||||
[](https://cookiecutter-django.readthedocs.io/en/latest/?badge=latest)
|
[](https://cookiecutter-django.readthedocs.io/en/latest/?badge=latest)
|
||||||
[](https://pyup.io/repos/github/cookiecutter/cookiecutter-django/)
|
[](https://pyup.io/repos/github/cookiecutter/cookiecutter-django/)
|
||||||
[](https://discord.gg/uFXweDQc5a)
|
[](https://discord.gg/uFXweDQc5a)
|
||||||
|
@ -17,8 +17,8 @@ production-ready Django projects quickly.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- For Django 3.2
|
- For Django 4.0
|
||||||
- Works with Python 3.9
|
- Works with Python 3.10
|
||||||
- Renders Django projects with 100% starting test coverage
|
- Renders Django projects with 100% starting test coverage
|
||||||
- Twitter [Bootstrap](https://github.com/twbs/bootstrap) v5
|
- 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](http://12factor.net/) based settings via [django-environ](https://github.com/joke2k/django-environ)
|
||||||
|
@ -29,7 +29,7 @@ production-ready Django projects quickly.
|
||||||
- Optional basic ASGI setup for Websockets
|
- Optional basic ASGI setup for Websockets
|
||||||
- Optional custom static build using Gulp and livereload
|
- Optional custom static build using Gulp and livereload
|
||||||
- Send emails via [Anymail](https://github.com/anymail/django-anymail) (using [Mailgun](http://www.mailgun.com/) by default or Amazon SES if AWS is selected cloud provider, but switchable)
|
- Send emails via [Anymail](https://github.com/anymail/django-anymail) (using [Mailgun](http://www.mailgun.com/) by default or Amazon SES if AWS is selected cloud provider, but switchable)
|
||||||
- Media storage using Amazon S3 or Google Cloud Storage
|
- Media storage using Amazon S3, Google Cloud Storage or Azure Storage
|
||||||
- Docker support using [docker-compose](https://github.com/docker/compose) for development and production (using [Traefik](https://traefik.io/) with [LetsEncrypt](https://letsencrypt.org/) support)
|
- Docker support using [docker-compose](https://github.com/docker/compose) for development and production (using [Traefik](https://traefik.io/) with [LetsEncrypt](https://letsencrypt.org/) support)
|
||||||
- [Procfile](https://devcenter.heroku.com/articles/procfile) for deploying to Heroku
|
- [Procfile](https://devcenter.heroku.com/articles/procfile) for deploying to Heroku
|
||||||
- Instructions for deploying to [PythonAnywhere](https://www.pythonanywhere.com/)
|
- Instructions for deploying to [PythonAnywhere](https://www.pythonanywhere.com/)
|
||||||
|
@ -41,7 +41,7 @@ production-ready Django projects quickly.
|
||||||
|
|
||||||
*These features can be enabled during initial project setup.*
|
*These features can be enabled during initial project setup.*
|
||||||
|
|
||||||
- Serve static files from Amazon S3, Google Cloud Storage or [Whitenoise](https://whitenoise.readthedocs.io/)
|
- 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)
|
- 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 [MailHog](https://github.com/mailhog/MailHog) for local email testing
|
||||||
- Integration with [Sentry](https://sentry.io/welcome/) for error logging
|
- Integration with [Sentry](https://sentry.io/welcome/) for error logging
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
"cloud_provider": [
|
"cloud_provider": [
|
||||||
"AWS",
|
"AWS",
|
||||||
"GCP",
|
"GCP",
|
||||||
|
"Azure",
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"mail_service": [
|
"mail_service": [
|
||||||
|
|
|
@ -34,7 +34,7 @@ Make sure your project is fully committed and pushed up to Bitbucket or Github o
|
||||||
|
|
||||||
git clone <my-repo-url> # you can also use hg
|
git clone <my-repo-url> # you can also use hg
|
||||||
cd my-project-name
|
cd my-project-name
|
||||||
mkvirtualenv --python=/usr/bin/python3.9 my-project-name
|
mkvirtualenv --python=/usr/bin/python3.10 my-project-name
|
||||||
pip install -r requirements/production.txt # may take a few minutes
|
pip install -r requirements/production.txt # may take a few minutes
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,6 @@ Getting Up and Running Locally With Docker
|
||||||
|
|
||||||
.. index:: Docker
|
.. index:: Docker
|
||||||
|
|
||||||
The steps below will get you up and running with a local development environment.
|
|
||||||
All of these commands assume you are in the root of your generated project.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If you're new to Docker, please be aware that some resources are cached system-wide
|
If you're new to Docker, please be aware that some resources are cached system-wide
|
||||||
|
@ -19,10 +16,16 @@ Prerequisites
|
||||||
* Docker; if you don't have it yet, follow the `installation instructions`_;
|
* Docker; if you don't have it yet, follow the `installation instructions`_;
|
||||||
* Docker Compose; refer to the official documentation for the `installation guide`_.
|
* Docker Compose; refer to the official documentation for the `installation guide`_.
|
||||||
* Pre-commit; refer to the official documentation for the `pre-commit`_.
|
* Pre-commit; refer to the official documentation for the `pre-commit`_.
|
||||||
|
* Cookiecutter; refer to the official GitHub repository of `Cookiecutter`_
|
||||||
|
|
||||||
.. _`installation instructions`: https://docs.docker.com/install/#supported-platforms
|
.. _`installation instructions`: https://docs.docker.com/install/#supported-platforms
|
||||||
.. _`installation guide`: https://docs.docker.com/compose/install/
|
.. _`installation guide`: https://docs.docker.com/compose/install/
|
||||||
.. _`pre-commit`: https://pre-commit.com/#install
|
.. _`pre-commit`: https://pre-commit.com/#install
|
||||||
|
.. _`Cookiecutter`: https://github.com/cookiecutter/cookiecutter
|
||||||
|
|
||||||
|
Before Getting Started
|
||||||
|
----------------------
|
||||||
|
.. include:: generate-project-block.rst
|
||||||
|
|
||||||
Build the Stack
|
Build the Stack
|
||||||
---------------
|
---------------
|
||||||
|
|
|
@ -9,7 +9,7 @@ Setting Up Development Environment
|
||||||
|
|
||||||
Make sure to have the following on your host:
|
Make sure to have the following on your host:
|
||||||
|
|
||||||
* Python 3.9
|
* Python 3.10
|
||||||
* PostgreSQL_.
|
* PostgreSQL_.
|
||||||
* Redis_, if using Celery
|
* Redis_, if using Celery
|
||||||
* Cookiecutter_
|
* Cookiecutter_
|
||||||
|
@ -18,15 +18,14 @@ First things first.
|
||||||
|
|
||||||
#. Create a virtualenv: ::
|
#. Create a virtualenv: ::
|
||||||
|
|
||||||
$ python3.9 -m venv <virtual env path>
|
$ python3.10 -m venv <virtual env path>
|
||||||
|
|
||||||
#. Activate the virtualenv you have just created: ::
|
#. Activate the virtualenv you have just created: ::
|
||||||
|
|
||||||
$ source <virtual env path>/bin/activate
|
$ source <virtual env path>/bin/activate
|
||||||
|
|
||||||
#. Install cookiecutter-django: ::
|
#.
|
||||||
|
.. include:: generate-project-block.rst
|
||||||
$ cookiecutter gh:cookiecutter/cookiecutter-django
|
|
||||||
|
|
||||||
#. Install development requirements: ::
|
#. Install development requirements: ::
|
||||||
|
|
||||||
|
@ -43,6 +42,7 @@ First things first.
|
||||||
#. Create a new PostgreSQL database using createdb_: ::
|
#. Create a new PostgreSQL database using createdb_: ::
|
||||||
|
|
||||||
$ createdb --username=postgres <project_slug>
|
$ createdb --username=postgres <project_slug>
|
||||||
|
|
||||||
``project_slug`` is what you have entered as the project_slug at the setup stage.
|
``project_slug`` is what you have entered as the project_slug at the setup stage.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
@ -82,7 +82,7 @@ First things first.
|
||||||
|
|
||||||
or if you're running asynchronously: ::
|
or if you're running asynchronously: ::
|
||||||
|
|
||||||
$ uvicorn config.asgi:application --host 0.0.0.0 --reload
|
$ uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html'
|
||||||
|
|
||||||
.. _PostgreSQL: https://www.postgresql.org/download/
|
.. _PostgreSQL: https://www.postgresql.org/download/
|
||||||
.. _Redis: https://redis.io/download
|
.. _Redis: https://redis.io/download
|
||||||
|
@ -141,15 +141,32 @@ In production, we have Mailgun_ configured to have your back!
|
||||||
Celery
|
Celery
|
||||||
------
|
------
|
||||||
|
|
||||||
If the project is configured to use Celery as a task scheduler then by default tasks are set to run on the main thread
|
If the project is configured to use Celery as a task scheduler then, by default, tasks are set to run on the main thread when developing locally instead of getting sent to a broker. However, if you have Redis setup on your local machine, you can set the following in ``config/settings/local.py``::
|
||||||
when developing locally. If you have the appropriate setup on your local machine then set the following
|
|
||||||
in ``config/settings/local.py``::
|
|
||||||
|
|
||||||
CELERY_TASK_ALWAYS_EAGER = False
|
CELERY_TASK_ALWAYS_EAGER = False
|
||||||
|
|
||||||
To run Celery locally, make sure redis-server is installed (instructions are available at https://redis.io/topics/quickstart), run the server in one terminal with `redis-server`, and then start celery in another terminal with the following command::
|
Next, make sure `redis-server` is installed (per the `Getting started with Redis`_ guide) and run the server in one terminal::
|
||||||
|
|
||||||
celery -A config.celery_app worker --loglevel=info
|
$ redis-server
|
||||||
|
|
||||||
|
Start the Celery worker by running the following command in another terminal::
|
||||||
|
|
||||||
|
$ celery -A config.celery_app worker --loglevel=info
|
||||||
|
|
||||||
|
That Celery worker should be running whenever your app is running, typically as a background process,
|
||||||
|
so that it can pick up any tasks that get queued. Learn more from the `Celery Workers Guide`_.
|
||||||
|
|
||||||
|
The project comes with a simple task for manual testing purposes, inside `<project_slug>/users/tasks.py`. To queue that task locally, start the Django shell, import the task, and call `delay()` on it::
|
||||||
|
|
||||||
|
$ python manage.py shell
|
||||||
|
>> from <project_slug>.users.tasks import get_users_count
|
||||||
|
>> get_users_count.delay()
|
||||||
|
|
||||||
|
You can also use Django admin to queue up tasks, thanks to the `django-celerybeat`_ package.
|
||||||
|
|
||||||
|
.. _Getting started with Redis guide: https://redis.io/docs/getting-started/
|
||||||
|
.. _Celery Workers Guide: https://docs.celeryq.dev/en/stable/userguide/workers.html
|
||||||
|
.. _django-celerybeat: https://django-celery-beat.readthedocs.io/en/latest/
|
||||||
|
|
||||||
|
|
||||||
Sass Compilation & Live Reloading
|
Sass Compilation & Live Reloading
|
||||||
|
|
7
docs/generate-project-block.rst
Normal file
7
docs/generate-project-block.rst
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Generate a new cookiecutter-django project: ::
|
||||||
|
|
||||||
|
$ cookiecutter gh:cookiecutter/cookiecutter-django
|
||||||
|
|
||||||
|
For more information refer to
|
||||||
|
:ref:`Project Generation Options <template-options>`.
|
||||||
|
|
|
@ -66,7 +66,8 @@ cloud_provider:
|
||||||
|
|
||||||
1. AWS_
|
1. AWS_
|
||||||
2. GCP_
|
2. GCP_
|
||||||
3. None
|
3. Azure_
|
||||||
|
4. None
|
||||||
|
|
||||||
Note that if you choose no cloud provider, media files won't work.
|
Note that if you choose no cloud provider, media files won't work.
|
||||||
|
|
||||||
|
@ -147,6 +148,7 @@ debug:
|
||||||
|
|
||||||
.. _AWS: https://aws.amazon.com/s3/
|
.. _AWS: https://aws.amazon.com/s3/
|
||||||
.. _GCP: https://cloud.google.com/storage/
|
.. _GCP: https://cloud.google.com/storage/
|
||||||
|
.. _Azure: https://azure.microsoft.com/en-us/products/storage/blobs/
|
||||||
|
|
||||||
.. _Amazon SES: https://aws.amazon.com/ses/
|
.. _Amazon SES: https://aws.amazon.com/ses/
|
||||||
.. _Mailgun: https://www.mailgun.com
|
.. _Mailgun: https://www.mailgun.com
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
sphinx==5.1.1
|
sphinx==5.3.0
|
||||||
sphinx-rtd-theme==1.0.0
|
sphinx-rtd-theme==1.1.1
|
||||||
|
|
|
@ -46,8 +46,12 @@ DJANGO_AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY n/a
|
||||||
DJANGO_AWS_STORAGE_BUCKET_NAME AWS_STORAGE_BUCKET_NAME n/a raises error
|
DJANGO_AWS_STORAGE_BUCKET_NAME AWS_STORAGE_BUCKET_NAME n/a raises error
|
||||||
DJANGO_AWS_S3_REGION_NAME AWS_S3_REGION_NAME n/a None
|
DJANGO_AWS_S3_REGION_NAME AWS_S3_REGION_NAME n/a None
|
||||||
DJANGO_AWS_S3_CUSTOM_DOMAIN AWS_S3_CUSTOM_DOMAIN n/a None
|
DJANGO_AWS_S3_CUSTOM_DOMAIN AWS_S3_CUSTOM_DOMAIN n/a None
|
||||||
|
DJANGO_AWS_S3_MAX_MEMORY_SIZE AWS_S3_MAX_MEMORY_SIZE n/a 100_000_000
|
||||||
DJANGO_GCP_STORAGE_BUCKET_NAME GS_BUCKET_NAME n/a raises error
|
DJANGO_GCP_STORAGE_BUCKET_NAME GS_BUCKET_NAME n/a raises error
|
||||||
GOOGLE_APPLICATION_CREDENTIALS n/a n/a raises error
|
GOOGLE_APPLICATION_CREDENTIALS n/a n/a raises error
|
||||||
|
DJANGO_AZURE_ACCOUNT_KEY AZURE_ACCOUNT_KEY n/a raises error
|
||||||
|
DJANGO_AZURE_ACCOUNT_NAME AZURE_ACCOUNT_NAME n/a raises error
|
||||||
|
DJANGO_AZURE_CONTAINER_NAME AZURE_CONTAINER n/a raises error
|
||||||
SENTRY_DSN SENTRY_DSN n/a raises error
|
SENTRY_DSN SENTRY_DSN n/a raises error
|
||||||
SENTRY_ENVIRONMENT n/a n/a production
|
SENTRY_ENVIRONMENT n/a n/a production
|
||||||
SENTRY_TRACES_SAMPLE_RATE n/a n/a 0.0
|
SENTRY_TRACES_SAMPLE_RATE n/a n/a 0.0
|
||||||
|
|
|
@ -28,10 +28,15 @@ Coverage
|
||||||
|
|
||||||
You should build your tests to provide the highest level of **code coverage**. You can run the ``pytest`` with code ``coverage`` by typing in the following command: ::
|
You should build your tests to provide the highest level of **code coverage**. You can run the ``pytest`` with code ``coverage`` by typing in the following command: ::
|
||||||
|
|
||||||
$ docker-compose -f local.yml run --rm django coverage run -m pytest
|
$ coverage run -m pytest
|
||||||
|
|
||||||
Once the tests are complete, in order to see the code coverage, run the following command: ::
|
Once the tests are complete, in order to see the code coverage, run the following command: ::
|
||||||
|
|
||||||
|
$ coverage report
|
||||||
|
|
||||||
|
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 report
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
@ -53,4 +58,4 @@ Once the tests are complete, in order to see the code coverage, run the followin
|
||||||
.. _develop locally with docker: ./developing-locally-docker.html
|
.. _develop locally with docker: ./developing-locally-docker.html
|
||||||
.. _customize: https://docs.pytest.org/en/latest/customize.html
|
.. _customize: https://docs.pytest.org/en/latest/customize.html
|
||||||
.. _unittest: https://docs.python.org/3/library/unittest.html#module-unittest
|
.. _unittest: https://docs.python.org/3/library/unittest.html#module-unittest
|
||||||
.. _configuring: https://coverage.readthedocs.io/en/v4.5.x/config.html
|
.. _configuring: https://coverage.readthedocs.io/en/latest/config.html
|
||||||
|
|
|
@ -36,7 +36,7 @@ if "{{ cookiecutter.use_docker }}".lower() == "n":
|
||||||
if python_major_version == 2:
|
if python_major_version == 2:
|
||||||
print(
|
print(
|
||||||
WARNING + "You're running cookiecutter under Python 2, but the generated "
|
WARNING + "You're running cookiecutter under Python 2, but the generated "
|
||||||
"project requires Python 3.9+. Do you want to proceed (y/n)? " + TERMINATOR
|
"project requires Python 3.10+. Do you want to proceed (y/n)? " + TERMINATOR
|
||||||
)
|
)
|
||||||
yes_options, no_options = frozenset(["y"]), frozenset(["n"])
|
yes_options, no_options = frozenset(["y"]), frozenset(["n"])
|
||||||
while True:
|
while True:
|
||||||
|
@ -72,11 +72,8 @@ if (
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
"{{ cookiecutter.cloud_provider }}" == "GCP"
|
"{{ cookiecutter.mail_service }}" == "Amazon SES"
|
||||||
and "{{ cookiecutter.mail_service }}" == "Amazon SES"
|
and "{{ cookiecutter.cloud_provider }}" != "AWS"
|
||||||
) or (
|
|
||||||
"{{ cookiecutter.cloud_provider }}" == "None"
|
|
||||||
and "{{ cookiecutter.mail_service }}" == "Amazon SES"
|
|
||||||
):
|
):
|
||||||
print(
|
print(
|
||||||
"You should either use AWS or select a different "
|
"You should either use AWS or select a different "
|
||||||
|
|
|
@ -4,23 +4,23 @@ binaryornot==0.4.4
|
||||||
|
|
||||||
# Code quality
|
# Code quality
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
black==22.8.0
|
black==22.12.0
|
||||||
isort==5.10.1
|
isort==5.11.4
|
||||||
flake8==5.0.4
|
flake8==6.0.0
|
||||||
flake8-isort==4.2.0
|
flake8-isort==6.0.0
|
||||||
pre-commit==2.20.0
|
pre-commit==2.21.0
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
tox==3.25.1
|
tox==4.2.6
|
||||||
pytest==7.1.3
|
pytest==7.2.0
|
||||||
pytest-cookies==0.6.1
|
pytest-cookies==0.6.1
|
||||||
pytest-instafail==0.4.2
|
pytest-instafail==0.4.2
|
||||||
pyyaml==6.0
|
pyyaml==6.0
|
||||||
|
|
||||||
# Scripting
|
# Scripting
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
PyGithub==1.55
|
PyGithub==1.57
|
||||||
gitpython==3.1.27
|
gitpython==3.1.30
|
||||||
jinja2==3.1.2
|
jinja2==3.1.2
|
||||||
requests==2.28.1
|
requests==2.28.1
|
||||||
|
|
|
@ -108,7 +108,7 @@ def get_all_latest_django_versions(
|
||||||
current_minor_version = DjVersion.parse(current_version_str)
|
current_minor_version = DjVersion.parse(current_version_str)
|
||||||
newer_versions: set[DjVersion] = set()
|
newer_versions: set[DjVersion] = set()
|
||||||
for django_version in get_django_versions():
|
for django_version in get_django_versions():
|
||||||
if _django_max_version >= django_version >= current_minor_version:
|
if current_minor_version < django_version <= _django_max_version:
|
||||||
newer_versions.add(django_version)
|
newer_versions.add(django_version)
|
||||||
|
|
||||||
return current_minor_version, sorted(newer_versions, reverse=True)
|
return current_minor_version, sorted(newer_versions, reverse=True)
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -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 = "2022.09.05"
|
version = "2023.01.10"
|
||||||
|
|
||||||
with open("README.rst") as readme_file:
|
with open("README.rst") as readme_file:
|
||||||
long_description = readme_file.read()
|
long_description = readme_file.read()
|
||||||
|
@ -27,13 +27,13 @@ setup(
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
"Environment :: Console",
|
"Environment :: Console",
|
||||||
"Framework :: Django :: 3.2",
|
"Framework :: Django :: 4.0",
|
||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
"Natural Language :: English",
|
"Natural Language :: English",
|
||||||
"License :: OSI Approved :: BSD License",
|
"License :: OSI Approved :: BSD License",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: Implementation :: CPython",
|
"Programming Language :: Python :: Implementation :: CPython",
|
||||||
"Topic :: Software Development",
|
"Topic :: Software Development",
|
||||||
],
|
],
|
||||||
|
|
|
@ -56,6 +56,8 @@ SUPPORTED_COMBINATIONS = [
|
||||||
{"cloud_provider": "AWS", "use_whitenoise": "n"},
|
{"cloud_provider": "AWS", "use_whitenoise": "n"},
|
||||||
{"cloud_provider": "GCP", "use_whitenoise": "y"},
|
{"cloud_provider": "GCP", "use_whitenoise": "y"},
|
||||||
{"cloud_provider": "GCP", "use_whitenoise": "n"},
|
{"cloud_provider": "GCP", "use_whitenoise": "n"},
|
||||||
|
{"cloud_provider": "Azure", "use_whitenoise": "y"},
|
||||||
|
{"cloud_provider": "Azure", "use_whitenoise": "n"},
|
||||||
{"cloud_provider": "None", "use_whitenoise": "y", "mail_service": "Mailgun"},
|
{"cloud_provider": "None", "use_whitenoise": "y", "mail_service": "Mailgun"},
|
||||||
{"cloud_provider": "None", "use_whitenoise": "y", "mail_service": "Mailjet"},
|
{"cloud_provider": "None", "use_whitenoise": "y", "mail_service": "Mailjet"},
|
||||||
{"cloud_provider": "None", "use_whitenoise": "y", "mail_service": "Mandrill"},
|
{"cloud_provider": "None", "use_whitenoise": "y", "mail_service": "Mandrill"},
|
||||||
|
@ -82,7 +84,16 @@ SUPPORTED_COMBINATIONS = [
|
||||||
{"cloud_provider": "GCP", "mail_service": "SendinBlue"},
|
{"cloud_provider": "GCP", "mail_service": "SendinBlue"},
|
||||||
{"cloud_provider": "GCP", "mail_service": "SparkPost"},
|
{"cloud_provider": "GCP", "mail_service": "SparkPost"},
|
||||||
{"cloud_provider": "GCP", "mail_service": "Other SMTP"},
|
{"cloud_provider": "GCP", "mail_service": "Other SMTP"},
|
||||||
# Note: cloud_providers GCP and None with mail_service Amazon SES is not supported
|
{"cloud_provider": "Azure", "mail_service": "Mailgun"},
|
||||||
|
{"cloud_provider": "Azure", "mail_service": "Mailjet"},
|
||||||
|
{"cloud_provider": "Azure", "mail_service": "Mandrill"},
|
||||||
|
{"cloud_provider": "Azure", "mail_service": "Postmark"},
|
||||||
|
{"cloud_provider": "Azure", "mail_service": "Sendgrid"},
|
||||||
|
{"cloud_provider": "Azure", "mail_service": "SendinBlue"},
|
||||||
|
{"cloud_provider": "Azure", "mail_service": "SparkPost"},
|
||||||
|
{"cloud_provider": "Azure", "mail_service": "Other SMTP"},
|
||||||
|
# Note: cloud_providers GCP, Azure, and None
|
||||||
|
# with mail_service Amazon SES is not supported
|
||||||
{"use_async": "y"},
|
{"use_async": "y"},
|
||||||
{"use_async": "n"},
|
{"use_async": "n"},
|
||||||
{"use_drf": "y"},
|
{"use_drf": "y"},
|
||||||
|
@ -113,6 +124,7 @@ SUPPORTED_COMBINATIONS = [
|
||||||
UNSUPPORTED_COMBINATIONS = [
|
UNSUPPORTED_COMBINATIONS = [
|
||||||
{"cloud_provider": "None", "use_whitenoise": "n"},
|
{"cloud_provider": "None", "use_whitenoise": "n"},
|
||||||
{"cloud_provider": "GCP", "mail_service": "Amazon SES"},
|
{"cloud_provider": "GCP", "mail_service": "Amazon SES"},
|
||||||
|
{"cloud_provider": "Azure", "mail_service": "Amazon SES"},
|
||||||
{"cloud_provider": "None", "mail_service": "Amazon SES"},
|
{"cloud_provider": "None", "mail_service": "Amazon SES"},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -1,6 +1,6 @@
|
||||||
[tox]
|
[tox]
|
||||||
skipsdist = true
|
skipsdist = true
|
||||||
envlist = py39,black-template
|
envlist = py310,black-template
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps = -rrequirements.txt
|
deps = -rrequirements.txt
|
||||||
|
|
|
@ -8,3 +8,4 @@
|
||||||
.readthedocs.yml
|
.readthedocs.yml
|
||||||
.travis.yml
|
.travis.yml
|
||||||
venv
|
venv
|
||||||
|
.git
|
||||||
|
|
|
@ -44,6 +44,12 @@ DJANGO_AWS_STORAGE_BUCKET_NAME=
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
GOOGLE_APPLICATION_CREDENTIALS=
|
GOOGLE_APPLICATION_CREDENTIALS=
|
||||||
DJANGO_GCP_STORAGE_BUCKET_NAME=
|
DJANGO_GCP_STORAGE_BUCKET_NAME=
|
||||||
|
{% elif cookiecutter.cloud_provider == 'Azure' %}
|
||||||
|
# Azure
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
DJANGO_AZURE_ACCOUNT_KEY=
|
||||||
|
DJANGO_AZURE_ACCOUNT_NAME=
|
||||||
|
DJANGO_AZURE_CONTAINER_NAME=
|
||||||
{% endif %}
|
{% endif %}
|
||||||
# django-allauth
|
# django-allauth
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
cache: pip
|
cache: pip
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
requirements/base.txt
|
requirements/base.txt
|
||||||
|
@ -87,7 +87,7 @@ jobs:
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
cache: pip
|
cache: pip
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
requirements/base.txt
|
requirements/base.txt
|
||||||
|
|
3
{{cookiecutter.project_slug}}/.gitignore
vendored
3
{{cookiecutter.project_slug}}/.gitignore
vendored
|
@ -326,6 +326,9 @@ Session.vim
|
||||||
# Auto-generated tag files
|
# Auto-generated tag files
|
||||||
tags
|
tags
|
||||||
|
|
||||||
|
# Redis dump file
|
||||||
|
dump.rdb
|
||||||
|
|
||||||
### Project template
|
### Project template
|
||||||
{%- if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n' %}
|
{%- if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n' %}
|
||||||
MailHog
|
MailHog
|
||||||
|
|
|
@ -13,7 +13,7 @@ variables:
|
||||||
|
|
||||||
flake8:
|
flake8:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: python:3.9-alpine
|
image: python:3.10-alpine
|
||||||
before_script:
|
before_script:
|
||||||
- pip install -q flake8
|
- pip install -q flake8
|
||||||
script:
|
script:
|
||||||
|
@ -35,7 +35,7 @@ pytest:
|
||||||
script:
|
script:
|
||||||
- docker-compose -f local.yml run django pytest
|
- docker-compose -f local.yml run django pytest
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
image: python:3.9
|
image: python:3.10
|
||||||
tags:
|
tags:
|
||||||
- python
|
- python
|
||||||
services:
|
services:
|
||||||
|
|
|
@ -3,30 +3,30 @@ default_stages: [commit]
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.3.0
|
rev: v4.4.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
|
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v2.37.3
|
rev: v3.3.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: [--py39-plus]
|
args: [--py310-plus]
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.8.0
|
rev: 22.12.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/isort
|
- repo: https://github.com/PyCQA/isort
|
||||||
rev: 5.10.1
|
rev: 5.11.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 5.0.4
|
rev: 6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
args: ["--config=setup.cfg"]
|
args: ["--config=setup.cfg"]
|
||||||
|
|
|
@ -7,6 +7,6 @@ build:
|
||||||
image: testing
|
image: testing
|
||||||
|
|
||||||
python:
|
python:
|
||||||
version: 3.9
|
version: 3.10
|
||||||
install:
|
install:
|
||||||
- requirements: requirements/local.txt
|
- requirements: requirements/local.txt
|
||||||
|
|
|
@ -2,7 +2,7 @@ dist: focal
|
||||||
|
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.9"
|
- "3.10"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- {% if cookiecutter.use_docker == 'y' %}docker{% else %}postgresql{% endif %}
|
- {% if cookiecutter.use_docker == 'y' %}docker{% else %}postgresql{% endif %}
|
||||||
|
@ -37,7 +37,7 @@ jobs:
|
||||||
- sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm
|
- sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.9"
|
- "3.10"
|
||||||
install:
|
install:
|
||||||
- pip install -r requirements/local.txt
|
- pip install -r requirements/local.txt
|
||||||
script:
|
script:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
ARG PYTHON_VERSION=3.9-slim-bullseye
|
ARG PYTHON_VERSION=3.10-slim-bullseye
|
||||||
|
|
||||||
# define an alias for the specfic python version used in this file.
|
# define an alias for the specfic python version used in this file.
|
||||||
FROM python:${PYTHON_VERSION} as python
|
FROM python:${PYTHON_VERSION} as python
|
||||||
|
|
|
@ -5,4 +5,4 @@ set -o nounset
|
||||||
|
|
||||||
|
|
||||||
rm -f './celerybeat.pid'
|
rm -f './celerybeat.pid'
|
||||||
celery -A config.celery_app beat -l INFO
|
exec watchfiles celery.__main__.main --args '-A config.celery_app beat -l INFO'
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
|
exec watchfiles celery.__main__.main \
|
||||||
celery \
|
--args \
|
||||||
-A config.celery_app \
|
"-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\""
|
||||||
-b "${CELERY_BROKER_URL}" \
|
|
||||||
flower \
|
|
||||||
--basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}"
|
|
||||||
|
|
|
@ -4,4 +4,4 @@ set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
|
|
||||||
watchfiles celery.__main__.main --args '-A config.celery_app worker -l INFO'
|
exec watchfiles celery.__main__.main --args '-A config.celery_app worker -l INFO'
|
||||||
|
|
|
@ -7,7 +7,7 @@ set -o nounset
|
||||||
|
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
{%- if cookiecutter.use_async == 'y' %}
|
{%- if cookiecutter.use_async == 'y' %}
|
||||||
uvicorn config.asgi:application --host 0.0.0.0 --reload
|
exec uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html'
|
||||||
{%- else %}
|
{%- else %}
|
||||||
python manage.py runserver_plus 0.0.0.0:8000
|
exec python manage.py runserver_plus 0.0.0.0:8000
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
ARG PYTHON_VERSION=3.9-slim-bullseye
|
ARG PYTHON_VERSION=3.10-slim-bullseye
|
||||||
|
|
||||||
# define an alias for the specfic python version used in this file.
|
# define an alias for the specfic python version used in this file.
|
||||||
FROM python:${PYTHON_VERSION} as python
|
FROM python:${PYTHON_VERSION} as python
|
||||||
|
@ -22,7 +22,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
COPY ./requirements /requirements
|
COPY ./requirements /requirements
|
||||||
|
|
||||||
# create python dependency wheels
|
# create python dependency wheels
|
||||||
RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels \
|
RUN pip wheel --no-cache-dir --wheel-dir /usr/src/app/wheels \
|
||||||
-r /requirements/local.txt -r /requirements/production.txt \
|
-r /requirements/local.txt -r /requirements/production.txt \
|
||||||
&& rm -rf /requirements
|
&& rm -rf /requirements
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,4 @@ set -o errexit
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
make livehtml
|
exec make livehtml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
ARG PYTHON_VERSION=3.9-slim-bullseye
|
ARG PYTHON_VERSION=3.10-slim-bullseye
|
||||||
|
|
||||||
{% if cookiecutter.frontend_pipeline == 'Gulp' -%}
|
{% if cookiecutter.frontend_pipeline == 'Gulp' -%}
|
||||||
FROM node:16-bullseye-slim as client-builder
|
FROM node:16-bullseye-slim as client-builder
|
||||||
|
|
|
@ -28,7 +28,7 @@ if compress_enabled; then
|
||||||
fi
|
fi
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_async == 'y' %}
|
{%- if cookiecutter.use_async == 'y' %}
|
||||||
/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app -k uvicorn.workers.UvicornWorker
|
exec /usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app -k uvicorn.workers.UvicornWorker
|
||||||
{%- else %}
|
{%- else %}
|
||||||
/usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app
|
exec /usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -30,8 +30,6 @@ LANGUAGE_CODE = "en-us"
|
||||||
SITE_ID = 1
|
SITE_ID = 1
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
|
# https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n
|
|
||||||
USE_L10N = True
|
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#use-tz
|
# https://docs.djangoproject.com/en/dev/ref/settings/#use-tz
|
||||||
USE_TZ = True
|
USE_TZ = True
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths
|
# https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths
|
||||||
|
@ -283,6 +281,13 @@ if USE_TZ:
|
||||||
CELERY_BROKER_URL = env("CELERY_BROKER_URL")
|
CELERY_BROKER_URL = env("CELERY_BROKER_URL")
|
||||||
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-result_backend
|
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-result_backend
|
||||||
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
|
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
|
||||||
|
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#result-extended
|
||||||
|
CELERY_RESULT_EXTENDED = True
|
||||||
|
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#result-backend-always-retry
|
||||||
|
# https://github.com/celery/celery/pull/6122
|
||||||
|
CELERY_RESULT_BACKEND_ALWAYS_RETRY = True
|
||||||
|
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#result-backend-max-retries
|
||||||
|
CELERY_RESULT_BACKEND_MAX_RETRIES = 10
|
||||||
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-accept_content
|
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-accept_content
|
||||||
CELERY_ACCEPT_CONTENT = ["json"]
|
CELERY_ACCEPT_CONTENT = ["json"]
|
||||||
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-task_serializer
|
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-task_serializer
|
||||||
|
@ -297,6 +302,10 @@ CELERY_TASK_TIME_LIMIT = 5 * 60
|
||||||
CELERY_TASK_SOFT_TIME_LIMIT = 60
|
CELERY_TASK_SOFT_TIME_LIMIT = 60
|
||||||
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#beat-scheduler
|
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#beat-scheduler
|
||||||
CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"
|
CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"
|
||||||
|
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#worker-send-task-events
|
||||||
|
CELERY_WORKER_SEND_TASK_EVENTS = True
|
||||||
|
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std-setting-task_send_sent_event
|
||||||
|
CELERY_TASK_SEND_SENT_EVENT = True
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
# django-allauth
|
# django-allauth
|
||||||
|
@ -346,10 +355,6 @@ SPECTACULAR_SETTINGS = {
|
||||||
"DESCRIPTION": "Documentation of API endpoints of {{ cookiecutter.project_name }}",
|
"DESCRIPTION": "Documentation of API endpoints of {{ cookiecutter.project_name }}",
|
||||||
"VERSION": "1.0.0",
|
"VERSION": "1.0.0",
|
||||||
"SERVE_PERMISSIONS": ["rest_framework.permissions.IsAdminUser"],
|
"SERVE_PERMISSIONS": ["rest_framework.permissions.IsAdminUser"],
|
||||||
"SERVERS": [
|
|
||||||
{"url": "http://127.0.0.1:8000", "description": "Local Development server"},
|
|
||||||
{"url": "https://{{ cookiecutter.domain_name }}", "description": "Production server"},
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
# Your stuff...
|
# Your stuff...
|
||||||
|
|
|
@ -22,8 +22,6 @@ ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["{{ cookiecutter.domai
|
||||||
|
|
||||||
# DATABASES
|
# DATABASES
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
DATABASES["default"] = env.db("DATABASE_URL") # noqa F405
|
|
||||||
DATABASES["default"]["ATOMIC_REQUESTS"] = True # noqa F405
|
|
||||||
DATABASES["default"]["CONN_MAX_AGE"] = env.int("CONN_MAX_AGE", default=60) # noqa F405
|
DATABASES["default"]["CONN_MAX_AGE"] = env.int("CONN_MAX_AGE", default=60) # noqa F405
|
||||||
|
|
||||||
# CACHES
|
# CACHES
|
||||||
|
@ -88,6 +86,11 @@ AWS_S3_OBJECT_PARAMETERS = {
|
||||||
"CacheControl": f"max-age={_AWS_EXPIRY}, s-maxage={_AWS_EXPIRY}, must-revalidate"
|
"CacheControl": f"max-age={_AWS_EXPIRY}, s-maxage={_AWS_EXPIRY}, must-revalidate"
|
||||||
}
|
}
|
||||||
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
|
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
|
||||||
|
AWS_S3_MAX_MEMORY_SIZE = env.int(
|
||||||
|
"DJANGO_AWS_S3_MAX_MEMORY_SIZE",
|
||||||
|
default=100_000_000, # 100MB
|
||||||
|
)
|
||||||
|
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
|
||||||
AWS_S3_REGION_NAME = env("DJANGO_AWS_S3_REGION_NAME", default=None)
|
AWS_S3_REGION_NAME = env("DJANGO_AWS_S3_REGION_NAME", default=None)
|
||||||
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#cloudfront
|
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#cloudfront
|
||||||
AWS_S3_CUSTOM_DOMAIN = env("DJANGO_AWS_S3_CUSTOM_DOMAIN", default=None)
|
AWS_S3_CUSTOM_DOMAIN = env("DJANGO_AWS_S3_CUSTOM_DOMAIN", default=None)
|
||||||
|
@ -95,6 +98,10 @@ aws_s3_domain = AWS_S3_CUSTOM_DOMAIN or f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws
|
||||||
{% elif cookiecutter.cloud_provider == 'GCP' %}
|
{% elif cookiecutter.cloud_provider == 'GCP' %}
|
||||||
GS_BUCKET_NAME = env("DJANGO_GCP_STORAGE_BUCKET_NAME")
|
GS_BUCKET_NAME = env("DJANGO_GCP_STORAGE_BUCKET_NAME")
|
||||||
GS_DEFAULT_ACL = "publicRead"
|
GS_DEFAULT_ACL = "publicRead"
|
||||||
|
{% elif cookiecutter.cloud_provider == 'Azure' %}
|
||||||
|
AZURE_ACCOUNT_KEY = env("DJANGO_AZURE_ACCOUNT_KEY")
|
||||||
|
AZURE_ACCOUNT_NAME = env("DJANGO_AZURE_ACCOUNT_NAME")
|
||||||
|
AZURE_CONTAINER = env("DJANGO_AZURE_CONTAINER_NAME")
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{% if cookiecutter.cloud_provider != 'None' or cookiecutter.use_whitenoise == 'y' -%}
|
{% if cookiecutter.cloud_provider != 'None' or cookiecutter.use_whitenoise == 'y' -%}
|
||||||
|
@ -111,6 +118,9 @@ STATIC_URL = f"https://{aws_s3_domain}/static/"
|
||||||
STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticRootGoogleCloudStorage"
|
STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticRootGoogleCloudStorage"
|
||||||
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' -%}
|
||||||
|
STATICFILES_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.StaticRootAzureStorage"
|
||||||
|
STATIC_URL = f"https://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/static/"
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
# MEDIA
|
# MEDIA
|
||||||
|
@ -121,6 +131,9 @@ 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.MediaRootGoogleCloudStorage"
|
||||||
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' %}
|
||||||
|
DEFAULT_FILE_STORAGE = "{{cookiecutter.project_slug}}.utils.storages.MediaRootAzureStorage"
|
||||||
|
MEDIA_URL = f"https://{AZURE_ACCOUNT_NAME}.blob.core.windows.net/media/"
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# EMAIL
|
# EMAIL
|
||||||
|
@ -167,7 +180,6 @@ EMAIL_BACKEND = "anymail.backends.mailjet.EmailBackend"
|
||||||
ANYMAIL = {
|
ANYMAIL = {
|
||||||
"MAILJET_API_KEY": env("MAILJET_API_KEY"),
|
"MAILJET_API_KEY": env("MAILJET_API_KEY"),
|
||||||
"MAILJET_SECRET_KEY": env("MAILJET_SECRET_KEY"),
|
"MAILJET_SECRET_KEY": env("MAILJET_SECRET_KEY"),
|
||||||
"MAILJET_API_URL": env("MAILJET_API_URL", default="https://api.mailjet.com/v3"),
|
|
||||||
}
|
}
|
||||||
{%- elif cookiecutter.mail_service == 'Mandrill' %}
|
{%- elif cookiecutter.mail_service == 'Mandrill' %}
|
||||||
# https://anymail.readthedocs.io/en/stable/esps/mandrill/
|
# https://anymail.readthedocs.io/en/stable/esps/mandrill/
|
||||||
|
@ -190,8 +202,6 @@ ANYMAIL = {
|
||||||
EMAIL_BACKEND = "anymail.backends.sendgrid.EmailBackend"
|
EMAIL_BACKEND = "anymail.backends.sendgrid.EmailBackend"
|
||||||
ANYMAIL = {
|
ANYMAIL = {
|
||||||
"SENDGRID_API_KEY": env("SENDGRID_API_KEY"),
|
"SENDGRID_API_KEY": env("SENDGRID_API_KEY"),
|
||||||
"SENDGRID_GENERATE_MESSAGE_ID": env("SENDGRID_GENERATE_MESSAGE_ID"),
|
|
||||||
"SENDGRID_MERGE_FIELD_FORMAT": env("SENDGRID_MERGE_FIELD_FORMAT"),
|
|
||||||
"SENDGRID_API_URL": env("SENDGRID_API_URL", default="https://api.sendgrid.com/v3/"),
|
"SENDGRID_API_URL": env("SENDGRID_API_URL", default="https://api.sendgrid.com/v3/"),
|
||||||
}
|
}
|
||||||
{%- elif cookiecutter.mail_service == 'SendinBlue' %}
|
{%- elif cookiecutter.mail_service == 'SendinBlue' %}
|
||||||
|
@ -226,7 +236,7 @@ COMPRESS_ENABLED = env.bool("COMPRESS_ENABLED", default=True)
|
||||||
{%- if cookiecutter.cloud_provider == 'None' %}
|
{%- if cookiecutter.cloud_provider == 'None' %}
|
||||||
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE
|
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE
|
||||||
COMPRESS_STORAGE = "compressor.storage.GzipCompressorFileStorage"
|
COMPRESS_STORAGE = "compressor.storage.GzipCompressorFileStorage"
|
||||||
{%- elif cookiecutter.cloud_provider in ('AWS', 'GCP') and cookiecutter.use_whitenoise == 'n' %}
|
{%- elif cookiecutter.cloud_provider in ('AWS', 'GCP', 'Azure') and cookiecutter.use_whitenoise == 'n' %}
|
||||||
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE
|
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE
|
||||||
COMPRESS_STORAGE = STATICFILES_STORAGE
|
COMPRESS_STORAGE = STATICFILES_STORAGE
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
@ -358,5 +368,15 @@ sentry_sdk.init(
|
||||||
traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=0.0),
|
traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=0.0),
|
||||||
)
|
)
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if cookiecutter.use_drf == "y" -%}
|
||||||
|
|
||||||
|
# django-rest-framework
|
||||||
|
# -------------------------------------------------------------------------------
|
||||||
|
# Tools that generate code samples can use SERVERS to point to the correct domain
|
||||||
|
SPECTACULAR_SETTINGS["SERVERS"] = [ # noqa F405
|
||||||
|
{"url": "https://{{ cookiecutter.domain_name }}", "description": "Production server"}
|
||||||
|
]
|
||||||
|
|
||||||
|
{%- endif %}
|
||||||
# Your stuff...
|
# Your stuff...
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -25,7 +25,7 @@ PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"]
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
|
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
|
||||||
EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
|
EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
|
||||||
|
|
||||||
# DEBUGING FOR TEMPLATES
|
# DEBUGGING FOR TEMPLATES
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore # noqa F405
|
TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore # noqa F405
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ services:
|
||||||
dockerfile: ./compose/local/django/Dockerfile
|
dockerfile: ./compose/local/django/Dockerfile
|
||||||
image: {{ cookiecutter.project_slug }}_local_django
|
image: {{ cookiecutter.project_slug }}_local_django
|
||||||
container_name: {{ cookiecutter.project_slug }}_local_django
|
container_name: {{ cookiecutter.project_slug }}_local_django
|
||||||
platform: linux/x86_64
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
{%- if cookiecutter.use_celery == 'y' %}
|
{%- if cookiecutter.use_celery == 'y' %}
|
||||||
|
@ -36,15 +35,14 @@ services:
|
||||||
image: {{ cookiecutter.project_slug }}_production_postgres
|
image: {{ cookiecutter.project_slug }}_production_postgres
|
||||||
container_name: {{ cookiecutter.project_slug }}_local_postgres
|
container_name: {{ cookiecutter.project_slug }}_local_postgres
|
||||||
volumes:
|
volumes:
|
||||||
- {{ cookiecutter.project_slug }}_local_postgres_data:/var/lib/postgresql/data:Z
|
- {{ cookiecutter.project_slug }}_local_postgres_data:/var/lib/postgresql/data
|
||||||
- {{ cookiecutter.project_slug }}_local_postgres_data_backups:/backups:z
|
- {{ cookiecutter.project_slug }}_local_postgres_data_backups:/backups
|
||||||
env_file:
|
env_file:
|
||||||
- ./.envs/.local/.postgres
|
- ./.envs/.local/.postgres
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
image: {{ cookiecutter.project_slug }}_local_docs
|
image: {{ cookiecutter.project_slug }}_local_docs
|
||||||
container_name: {{ cookiecutter.project_slug }}_local_docs
|
container_name: {{ cookiecutter.project_slug }}_local_docs
|
||||||
platform: linux/x86_64
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./compose/local/docs/Dockerfile
|
dockerfile: ./compose/local/docs/Dockerfile
|
||||||
|
|
|
@ -11,7 +11,6 @@ services:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./compose/production/django/Dockerfile
|
dockerfile: ./compose/production/django/Dockerfile
|
||||||
image: {{ cookiecutter.project_slug }}_production_django
|
image: {{ cookiecutter.project_slug }}_production_django
|
||||||
platform: linux/x86_64
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
|
@ -26,8 +25,8 @@ services:
|
||||||
dockerfile: ./compose/production/postgres/Dockerfile
|
dockerfile: ./compose/production/postgres/Dockerfile
|
||||||
image: {{ cookiecutter.project_slug }}_production_postgres
|
image: {{ cookiecutter.project_slug }}_production_postgres
|
||||||
volumes:
|
volumes:
|
||||||
- production_postgres_data:/var/lib/postgresql/data:Z
|
- production_postgres_data:/var/lib/postgresql/data
|
||||||
- production_postgres_data_backups:/backups:z
|
- production_postgres_data_backups:/backups
|
||||||
env_file:
|
env_file:
|
||||||
- ./.envs/.production/.postgres
|
- ./.envs/.production/.postgres
|
||||||
|
|
||||||
|
@ -39,7 +38,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- django
|
- django
|
||||||
volumes:
|
volumes:
|
||||||
- production_traefik:/etc/traefik/acme:z
|
- production_traefik:/etc/traefik/acme
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:80:80"
|
- "0.0.0.0:80:80"
|
||||||
- "0.0.0.0:443:443"
|
- "0.0.0.0:443:443"
|
||||||
|
|
|
@ -1,48 +1,48 @@
|
||||||
pytz==2022.2.1 # https://github.com/stub42/pytz
|
pytz==2022.7 # https://github.com/stub42/pytz
|
||||||
python-slugify==6.1.2 # https://github.com/un33k/python-slugify
|
python-slugify==7.0.0 # https://github.com/un33k/python-slugify
|
||||||
Pillow==9.2.0 # https://github.com/python-pillow/Pillow
|
Pillow==9.4.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.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
|
||||||
{%- else %}
|
{%- else %}
|
||||||
rcssmin==1.1.0 # https://github.com/ndparker/rcssmin
|
rcssmin==1.1.1 # https://github.com/ndparker/rcssmin
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi
|
argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi
|
||||||
{%- if cookiecutter.use_whitenoise == 'y' %}
|
{%- if cookiecutter.use_whitenoise == 'y' %}
|
||||||
whitenoise==6.2.0 # https://github.com/evansd/whitenoise
|
whitenoise==6.3.0 # https://github.com/evansd/whitenoise
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
redis==4.3.4 # https://github.com/redis/redis-py
|
redis==4.4.1 # 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.0.0 # https://github.com/redis/hiredis-py
|
hiredis==2.1.1 # https://github.com/redis/hiredis-py
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_celery == "y" %}
|
{%- if cookiecutter.use_celery == "y" %}
|
||||||
celery==5.2.7 # pyup: < 6.0 # https://github.com/celery/celery
|
celery==5.2.7 # pyup: < 6.0 # https://github.com/celery/celery
|
||||||
django-celery-beat==2.3.0 # https://github.com/celery/django-celery-beat
|
django-celery-beat==2.4.0 # https://github.com/celery/django-celery-beat
|
||||||
{%- if cookiecutter.use_docker == 'y' %}
|
{%- if cookiecutter.use_docker == 'y' %}
|
||||||
flower==1.2.0 # https://github.com/mher/flower
|
flower==1.2.0 # https://github.com/mher/flower
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_async == 'y' %}
|
{%- if cookiecutter.use_async == 'y' %}
|
||||||
uvicorn[standard]==0.18.3 # https://github.com/encode/uvicorn
|
uvicorn[standard]==0.20.0 # https://github.com/encode/uvicorn
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
django==3.2.15 # pyup: < 4.0 # https://www.djangoproject.com/
|
django==4.0.8 # pyup: < 4.1 # https://www.djangoproject.com/
|
||||||
django-environ==0.9.0 # https://github.com/joke2k/django-environ
|
django-environ==0.9.0 # https://github.com/joke2k/django-environ
|
||||||
django-model-utils==4.2.0 # https://github.com/jazzband/django-model-utils
|
django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils
|
||||||
django-allauth==0.51.0 # https://github.com/pennersr/django-allauth
|
django-allauth==0.52.0 # https://github.com/pennersr/django-allauth
|
||||||
django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms
|
django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms
|
||||||
crispy-bootstrap5==0.6 # 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' %}
|
||||||
django-compressor==4.1 # https://github.com/django-compressor/django-compressor
|
django-compressor==4.3 # https://github.com/django-compressor/django-compressor
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
django-redis==5.2.0 # https://github.com/jazzband/django-redis
|
django-redis==5.2.0 # https://github.com/jazzband/django-redis
|
||||||
{%- if cookiecutter.use_drf == 'y' %}
|
{%- if cookiecutter.use_drf == 'y' %}
|
||||||
# Django REST Framework
|
# Django REST Framework
|
||||||
djangorestframework==3.13.1 # https://github.com/encode/django-rest-framework
|
djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework
|
||||||
django-cors-headers==3.13.0 # https://github.com/adamchainz/django-cors-headers
|
django-cors-headers==3.13.0 # https://github.com/adamchainz/django-cors-headers
|
||||||
# DRF-spectacular for api documentation
|
# DRF-spectacular for api documentation
|
||||||
drf-spectacular==0.23.1 # https://github.com/tfranzel/drf-spectacular
|
drf-spectacular==0.25.1 # https://github.com/tfranzel/drf-spectacular
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -1,48 +1,48 @@
|
||||||
-r base.txt
|
-r base.txt
|
||||||
|
|
||||||
Werkzeug[watchdog]==2.2.2 # https://github.com/pallets/werkzeug
|
Werkzeug[watchdog]==2.2.2 # https://github.com/pallets/werkzeug
|
||||||
ipdb==0.13.9 # https://github.com/gotcha/ipdb
|
ipdb==0.13.11 # https://github.com/gotcha/ipdb
|
||||||
{%- if cookiecutter.use_docker == 'y' %}
|
{%- if cookiecutter.use_docker == 'y' %}
|
||||||
psycopg2==2.9.3 # https://github.com/psycopg/psycopg2
|
psycopg2==2.9.5 # https://github.com/psycopg/psycopg2
|
||||||
{%- else %}
|
{%- else %}
|
||||||
psycopg2-binary==2.9.3 # https://github.com/psycopg/psycopg2
|
psycopg2-binary==2.9.5 # https://github.com/psycopg/psycopg2
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
|
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
|
||||||
watchfiles==0.16.1 # https://github.com/samuelcolvin/watchfiles
|
watchfiles==0.18.1 # https://github.com/samuelcolvin/watchfiles
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
mypy==0.971 # https://github.com/python/mypy
|
mypy==0.982 # https://github.com/python/mypy
|
||||||
django-stubs==1.12.0 # https://github.com/typeddjango/django-stubs
|
django-stubs==1.13.1 # https://github.com/typeddjango/django-stubs
|
||||||
pytest==7.1.3 # https://github.com/pytest-dev/pytest
|
pytest==7.2.0 # https://github.com/pytest-dev/pytest
|
||||||
pytest-sugar==0.9.5 # https://github.com/Frozenball/pytest-sugar
|
pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar
|
||||||
{%- if cookiecutter.use_drf == "y" %}
|
{%- if cookiecutter.use_drf == "y" %}
|
||||||
djangorestframework-stubs==1.7.0 # https://github.com/typeddjango/djangorestframework-stubs
|
djangorestframework-stubs==1.8.0 # https://github.com/typeddjango/djangorestframework-stubs
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
sphinx==5.1.1 # https://github.com/sphinx-doc/sphinx
|
sphinx==5.3.0 # 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
|
||||||
|
|
||||||
# Code quality
|
# Code quality
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
flake8==5.0.4 # https://github.com/PyCQA/flake8
|
flake8==6.0.0 # https://github.com/PyCQA/flake8
|
||||||
flake8-isort==4.2.0 # https://github.com/gforcada/flake8-isort
|
flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort
|
||||||
coverage==6.4.4 # https://github.com/nedbat/coveragepy
|
coverage==7.0.4 # https://github.com/nedbat/coveragepy
|
||||||
black==22.8.0 # https://github.com/psf/black
|
black==22.12.0 # https://github.com/psf/black
|
||||||
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' %}
|
||||||
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
|
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
pre-commit==2.20.0 # https://github.com/pre-commit/pre-commit
|
pre-commit==2.21.0 # https://github.com/pre-commit/pre-commit
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
factory-boy==3.2.1 # https://github.com/FactoryBoy/factory_boy
|
factory-boy==3.2.1 # https://github.com/FactoryBoy/factory_boy
|
||||||
|
|
||||||
django-debug-toolbar==3.6.0 # https://github.com/jazzband/django-debug-toolbar
|
django-debug-toolbar==3.8.1 # https://github.com/jazzband/django-debug-toolbar
|
||||||
django-extensions==3.2.0 # https://github.com/django-extensions/django-extensions
|
django-extensions==3.2.1 # https://github.com/django-extensions/django-extensions
|
||||||
django-coverage-plugin==2.0.3 # https://github.com/nedbat/django_coverage_plugin
|
django-coverage-plugin==3.0.0 # https://github.com/nedbat/django_coverage_plugin
|
||||||
pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django
|
pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django
|
||||||
|
|
|
@ -3,40 +3,42 @@
|
||||||
-r base.txt
|
-r base.txt
|
||||||
|
|
||||||
gunicorn==20.1.0 # https://github.com/benoitc/gunicorn
|
gunicorn==20.1.0 # https://github.com/benoitc/gunicorn
|
||||||
psycopg2==2.9.3 # https://github.com/psycopg/psycopg2
|
psycopg2==2.9.5 # https://github.com/psycopg/psycopg2
|
||||||
{%- if cookiecutter.use_whitenoise == 'n' %}
|
{%- if cookiecutter.use_whitenoise == 'n' %}
|
||||||
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.9.8 # https://github.com/getsentry/sentry-python
|
sentry-sdk==1.12.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.0.0 # https://github.com/redis/hiredis-py
|
hiredis==2.1.1 # https://github.com/redis/hiredis-py
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
{%- if cookiecutter.cloud_provider == 'AWS' %}
|
{%- if cookiecutter.cloud_provider == 'AWS' %}
|
||||||
django-storages[boto3]==1.13.1 # https://github.com/jschneier/django-storages
|
django-storages[boto3]==1.13.2 # https://github.com/jschneier/django-storages
|
||||||
{%- elif cookiecutter.cloud_provider == 'GCP' %}
|
{%- elif cookiecutter.cloud_provider == 'GCP' %}
|
||||||
django-storages[google]==1.13.1 # https://github.com/jschneier/django-storages
|
django-storages[google]==1.13.2 # https://github.com/jschneier/django-storages
|
||||||
|
{%- elif cookiecutter.cloud_provider == 'Azure' %}
|
||||||
|
django-storages[azure]==1.13.2 # https://github.com/jschneier/django-storages
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.mail_service == 'Mailgun' %}
|
{%- if cookiecutter.mail_service == 'Mailgun' %}
|
||||||
django-anymail[mailgun]==8.6 # https://github.com/anymail/django-anymail
|
django-anymail[mailgun]==9.0 # https://github.com/anymail/django-anymail
|
||||||
{%- elif cookiecutter.mail_service == 'Amazon SES' %}
|
{%- elif cookiecutter.mail_service == 'Amazon SES' %}
|
||||||
django-anymail[amazon_ses]==8.6 # https://github.com/anymail/django-anymail
|
django-anymail[amazon_ses]==9.0 # https://github.com/anymail/django-anymail
|
||||||
{%- elif cookiecutter.mail_service == 'Mailjet' %}
|
{%- elif cookiecutter.mail_service == 'Mailjet' %}
|
||||||
django-anymail[mailjet]==8.6 # https://github.com/anymail/django-anymail
|
django-anymail[mailjet]==9.0 # https://github.com/anymail/django-anymail
|
||||||
{%- elif cookiecutter.mail_service == 'Mandrill' %}
|
{%- elif cookiecutter.mail_service == 'Mandrill' %}
|
||||||
django-anymail[mandrill]==8.6 # https://github.com/anymail/django-anymail
|
django-anymail[mandrill]==9.0 # https://github.com/anymail/django-anymail
|
||||||
{%- elif cookiecutter.mail_service == 'Postmark' %}
|
{%- elif cookiecutter.mail_service == 'Postmark' %}
|
||||||
django-anymail[postmark]==8.6 # https://github.com/anymail/django-anymail
|
django-anymail[postmark]==9.0 # https://github.com/anymail/django-anymail
|
||||||
{%- elif cookiecutter.mail_service == 'Sendgrid' %}
|
{%- elif cookiecutter.mail_service == 'Sendgrid' %}
|
||||||
django-anymail[sendgrid]==8.6 # https://github.com/anymail/django-anymail
|
django-anymail[sendgrid]==9.0 # https://github.com/anymail/django-anymail
|
||||||
{%- elif cookiecutter.mail_service == 'SendinBlue' %}
|
{%- elif cookiecutter.mail_service == 'SendinBlue' %}
|
||||||
django-anymail[sendinblue]==8.6 # https://github.com/anymail/django-anymail
|
django-anymail[sendinblue]==9.0 # https://github.com/anymail/django-anymail
|
||||||
{%- elif cookiecutter.mail_service == 'SparkPost' %}
|
{%- elif cookiecutter.mail_service == 'SparkPost' %}
|
||||||
django-anymail[sparkpost]==8.6 # https://github.com/anymail/django-anymail
|
django-anymail[sparkpost]==9.0 # https://github.com/anymail/django-anymail
|
||||||
{%- elif cookiecutter.mail_service == 'Other SMTP' %}
|
{%- elif cookiecutter.mail_service == 'Other SMTP' %}
|
||||||
django-anymail==8.6 # https://github.com/anymail/django-anymail
|
django-anymail==9.0 # https://github.com/anymail/django-anymail
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
python-3.9.13
|
python-3.10.8
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv
|
exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv,.venv
|
||||||
|
|
||||||
[pycodestyle]
|
[pycodestyle]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv
|
exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv,.venv
|
||||||
|
|
||||||
[isort]
|
[isort]
|
||||||
line_length = 88
|
line_length = 88
|
||||||
|
@ -18,7 +18,7 @@ force_grid_wrap = 0
|
||||||
use_parentheses = true
|
use_parentheses = true
|
||||||
|
|
||||||
[mypy]
|
[mypy]
|
||||||
python_version = 3.9
|
python_version = 3.10
|
||||||
check_untyped_defs = True
|
check_untyped_defs = True
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
warn_unused_ignores = True
|
warn_unused_ignores = True
|
||||||
|
@ -34,7 +34,7 @@ django_settings_module = config.settings.test
|
||||||
ignore_errors = True
|
ignore_errors = True
|
||||||
|
|
||||||
[coverage:run]
|
[coverage:run]
|
||||||
include = {{cookiecutter.project_slug}}/*
|
include = {{cookiecutter.project_slug}}/**
|
||||||
omit = *migrations*, *tests*
|
omit = *migrations*, *tests*
|
||||||
plugins =
|
plugins =
|
||||||
django_coverage_plugin
|
django_coverage_plugin
|
||||||
|
|
23
{{cookiecutter.project_slug}}/utility/requirements-jammy.apt
Normal file
23
{{cookiecutter.project_slug}}/utility/requirements-jammy.apt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
##basic build dependencies of various Django apps for Ubuntu Jammy 22.04
|
||||||
|
#build-essential metapackage install: make, gcc, g++,
|
||||||
|
build-essential
|
||||||
|
#required to translate
|
||||||
|
gettext
|
||||||
|
python3-dev
|
||||||
|
|
||||||
|
##shared dependencies of:
|
||||||
|
##Pillow, pylibmc
|
||||||
|
zlib1g-dev
|
||||||
|
|
||||||
|
##Postgresql and psycopg2 dependencies
|
||||||
|
libpq-dev
|
||||||
|
|
||||||
|
##Pillow dependencies
|
||||||
|
libtiff5-dev
|
||||||
|
libjpeg8-dev
|
||||||
|
libfreetype6-dev
|
||||||
|
liblcms2-dev
|
||||||
|
libwebp-dev
|
||||||
|
|
||||||
|
##django-extensions
|
||||||
|
graphviz-dev
|
|
@ -1,4 +1,3 @@
|
||||||
# Generated by Django 3.2.9 on 2021-11-20 11:23
|
|
||||||
import django.contrib.auth.models
|
import django.contrib.auth.models
|
||||||
import django.contrib.auth.validators
|
import django.contrib.auth.validators
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
|
@ -22,4 +22,15 @@ class StaticRootGoogleCloudStorage(GoogleCloudStorage):
|
||||||
class MediaRootGoogleCloudStorage(GoogleCloudStorage):
|
class MediaRootGoogleCloudStorage(GoogleCloudStorage):
|
||||||
location = "media"
|
location = "media"
|
||||||
file_overwrite = False
|
file_overwrite = False
|
||||||
|
{%- elif cookiecutter.cloud_provider == 'Azure' -%}
|
||||||
|
from storages.backends.azure_storage import AzureStorage
|
||||||
|
|
||||||
|
|
||||||
|
class StaticRootAzureStorage(AzureStorage):
|
||||||
|
location = "static"
|
||||||
|
|
||||||
|
|
||||||
|
class MediaRootAzureStorage(AzureStorage):
|
||||||
|
location = "media"
|
||||||
|
file_overwrite = False
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user