Compare commits

...

418 Commits

Author SHA1 Message Date
browniebroke
22fb3141a1 Update Contributors 2025-04-05 10:42:33 +00:00
Aidos Kanapyanov
458a21ee5c
Add Docker build caching on GitHub Actions (#5700) 2025-04-05 11:42:17 +01:00
pyup.io bot
06c0cd2bf8
Update ruff to 0.11.4 (#5767) 2025-04-05 11:03:17 +01:00
browniebroke
10d80a2ff9 Update Contributors 2025-04-05 09:58:43 +00:00
Pepa
6455b39c07
Pin Pillow and Sphinx to non yanked release (#5765) 2025-04-05 10:58:27 +01:00
Bruno Alla
bf9ac68fed
Skip align-versions workflow (#5766)
* Skip align-versions workflow on forks

* Update repo link in local.txt

* Update condition to restrict on GitHub actor
2025-04-04 14:03:23 +01:00
github-actions
bb2d056a15 Release 2025.04.03 2025-04-04 02:31:57 +00:00
pyup.io bot
7ba49c9dc5
Update django-anymail to 13.0 (#5763) 2025-04-03 23:23:35 +01:00
pyup.io bot
b4590cf8d9
Update pytest-django from 4.11.0 to 4.11.1 (#5762) 2025-04-03 21:42:46 +01:00
pyup.io bot
8f1b488069
Update ruff to 0.11.3 (#5761) 2025-04-03 16:12:24 +01:00
pyup.io bot
9085f602fa
Update django-allauth from 65.6.0 to 65.7.0 (#5760) 2025-04-03 14:18:33 +01:00
github-actions
1e19553ded Release 2025.04.02 2025-04-03 02:32:18 +00:00
pyup.io bot
285e86bf71
Update crispy-bootstrap5 from 2024.10 to 2025.4 (#5756) 2025-04-02 19:49:33 +01:00
Pulse-Mind
7d8dabb813
Update Django from 5.0 to 5.1 (#5740) 2025-04-02 19:47:59 +01:00
pyup.io bot
b4f95514aa
Update sentry-sdk from 2.25.0 to 2.25.1 (#5757) 2025-04-02 18:06:12 +01:00
browniebroke
97c363bf9e Update Contributors 2025-04-02 13:43:00 +00:00
Igor Jerosimić
6ea1f3c718
Fix line endings for dotenv merge script on Windows (#5754) 2025-04-02 14:42:43 +01:00
pyup.io bot
a802ac491c
Update django-storages to 1.14.6 (#5753) 2025-04-02 08:45:13 +01:00
pyup.io bot
f1760fb835
Update pytest-django from 4.10.0 to 4.11.0 (#5752) 2025-04-02 08:44:28 +01:00
github-actions
5c5ec3a2ba Release 2025.04.01 2025-04-02 02:32:29 +00:00
pyup.io bot
dd24cdb036
Update pillow from 11.1.0 to 11.2.0 (#5751) 2025-04-01 16:13:09 +01:00
dependabot[bot]
0c1a349bfa
Bump traefik from 3.3.4 to 3.3.5 (#5750) 2025-04-01 10:38:01 +01:00
pyup.io bot
54c70edf39
Update celery from 5.4.0 to 5.5.0 (#5748) 2025-04-01 08:23:00 +01:00
github-actions
c550acd874 Release 2025.03.31 2025-04-01 02:35:59 +00:00
pyup.io bot
3e95ca6d8f
Update django-allauth from 65.5.0 to 65.6.0 (#5741) 2025-03-31 15:32:12 +01:00
pyup.io bot
9910a2bb91
Update sentry-sdk from 2.24.1 to 2.25.0 (#5747) 2025-03-31 15:31:44 +01:00
pyup.io bot
179e4846a5
Update coverage from 7.7.1 to 7.8.0 (#5745) 2025-03-31 15:31:31 +01:00
github-actions[bot]
23747ef0f4
Auto-update flake8 pre-commit hook (#5744) 2025-03-31 15:31:14 +01:00
github-actions
2504a349af Release 2025.03.28 2025-03-29 02:30:51 +00:00
pyup.io bot
31f7901060
Update djangorestframework from 3.15.2 to 3.16.0 (#5743) 2025-03-28 17:49:10 +00:00
github-actions[bot]
28aa085015
Update django-upgrade pre-commit hook to v1.24.0 (#5742) 2025-03-28 10:41:11 +00:00
github-actions
8459a36369 Release 2025.03.24 2025-03-25 02:31:51 +00:00
pyup.io bot
7fbcc652f1
Update django-allauth to 65.5.0 (#5723) 2025-03-24 23:00:28 +00:00
pyup.io bot
c04a8e39f9
Update sentry-sdk from 2.24.0 to 2.24.1 (#5739) 2025-03-24 13:01:17 +00:00
github-actions
9c68c8f3db Release 2025.03.22 2025-03-23 02:33:26 +00:00
pyup.io bot
e1a7d93d09
Update coverage from 7.7.0 to 7.7.1 (#5736) 2025-03-22 12:53:46 +00:00
github-actions
6d5fdb7e04 Release 2025.03.21 2025-03-22 02:29:44 +00:00
pyup.io bot
0822b46c2f
Update sentry-sdk from 2.23.1 to 2.24.0 (#5734) 2025-03-21 14:10:42 +00:00
pyup.io bot
1e22b0b987
Update django-debug-toolbar from 5.0.1 to 5.1.0 (#5732) 2025-03-21 14:10:31 +00:00
pyup.io bot
29c70dfd0d
Update ruff to 0.11.2 (#5735) 2025-03-21 14:10:00 +00:00
dependabot[bot]
1696a9d277
Bump amazon/aws-cli (#5733) 2025-03-21 11:04:02 +00:00
github-actions[bot]
100271e7e1
Auto-update pre-commit hooks (#5657) 2025-03-21 11:03:41 +00:00
pyup.io bot
b37fa9c79f
Update ruff to 0.11.1 (#5731) 2025-03-21 10:58:14 +00:00
github-actions
3f3bc529ae Release 2025.03.19 2025-03-20 02:30:33 +00:00
pyup.io bot
e5c315bbc7
Update pre-commit from 4.1.0 to 4.2.0 (#5730) 2025-03-19 08:42:49 +00:00
github-actions
05ce556006 Release 2025.03.17 2025-03-18 02:31:28 +00:00
pyup.io bot
e6fac6075d
Update sentry-sdk from 2.22.0 to 2.23.1 (#5727) 2025-03-17 14:34:51 +00:00
pyup.io bot
ffb6f616a7
Update coverage from 7.6.12 to 7.7.0 (#5725) 2025-03-17 10:11:32 +00:00
github-actions
aa5308e82a Release 2025.03.15 2025-03-16 02:32:10 +00:00
pyup-bot
0849bb518d Update psycopg from 3.2.5 to 3.2.6 2025-03-15 08:43:43 -03:00
pyup-bot
3ea0666650 Update psycopg from 3.2.5 to 3.2.6 2025-03-15 08:43:43 -03:00
pyup-bot
9691dc10c8 Update psycopg from 3.2.5 to 3.2.6 2025-03-15 08:43:43 -03:00
pyup.io bot
51d1c5bb5f
Update ruff to 0.11.0 (#5724) 2025-03-15 10:23:52 +00:00
github-actions
fb5fcdbcaf Release 2025.03.08 2025-03-09 02:17:53 +00:00
pyup.io bot
4443eb41c2
Update ruff to 0.9.10 (#5720) 2025-03-08 10:17:26 +00:00
github-actions
c85e2f57f5 Release 2025.03.06 2025-03-07 02:30:27 +00:00
pyup.io bot
50ddc282d7
Update django from 5.0.12 to 5.0.13 (#5719) 2025-03-06 18:34:55 +00:00
github-actions
dfc2fb134b Release 2025.03.04 2025-03-05 02:29:49 +00:00
Bruno Alla
e4ee6565ef
Enable uv updates for Dependabot (#5716) 2025-03-04 13:33:42 +00:00
pyup.io bot
16488dd0cf
Update sphinx to 8.3.0 (#5714) 2025-03-04 12:35:15 +00:00
pyup.io bot
d506d38f2e
Update pytest to 8.3.5 (#5713) 2025-03-04 12:34:21 +00:00
Matthew Foster Walsh
b3389579c1
Add groups for dependabot updates (#5709)
* Add groups for docker prs

* development update group doesn't work

* Remove docker group and exclude major package updates
2025-03-04 12:33:30 +00:00
github-actions
7c9f6a75af Release 2025.03.01 2025-03-02 02:30:47 +00:00
pyup.io bot
0b90ecf4bf
Update ruff to 0.9.9 (#5711) 2025-03-01 09:20:09 +00:00
github-actions
79f572c010 Release 2025.02.28 2025-03-01 02:31:13 +00:00
Bruno Alla
2d5d84f61a Minor styling tweaks 2025-02-28 10:41:42 +00:00
pyup.io bot
4c8ab6b4ba
Update ruff to 0.9.8 (#5708) 2025-02-28 10:36:26 +00:00
dependabot[bot]
ee40ae6119
Bump babel-loader from 9.2.1 to 10.0.0 (#5710) 2025-02-28 10:35:38 +00:00
github-actions
8bc53f538c Release 2025.02.26 2025-02-27 02:29:19 +00:00
dependabot[bot]
6e9d2de035
Bump traefik from 3.3.3 to 3.3.4 (#5705) 2025-02-26 09:40:10 +00:00
github-actions
e6f16d424f Release 2025.02.25 2025-02-26 02:28:48 +00:00
browniebroke
e7cad8f1c6 Update Contributors 2025-02-25 13:56:16 +00:00
Kawsar Alam Foysal
e8d328b283
Fix links to FAQ about contrib.sites directory (#5704) 2025-02-25 13:55:52 +00:00
github-actions
fedf1f34d6 Release 2025.02.23 2025-02-24 02:30:01 +00:00
pyup.io bot
90d55a3a48
Update sphinx to 8.2.1 (#5696) 2025-02-23 20:08:00 +00:00
pyup.io bot
c898ed0dc8
Update psycopg to 3.2.5 (#5697) 2025-02-23 20:07:48 +00:00
Matthew Foster Walsh
fcef872763
Group dependabot docker directories (#5698) 2025-02-23 20:07:15 +00:00
github-actions
697e8e40ce Release 2025.02.21 2025-02-22 02:25:06 +00:00
pyup.io bot
70f5a984b4
Update djangorestframework-stubs to 3.15.3 (#5695) 2025-02-21 17:09:51 +00:00
pyup.io bot
ccbb1d3afc
Update sphinx to 8.2.0 (#5693) 2025-02-21 17:09:32 +00:00
pyup.io bot
7e736503ee
Update ruff to 0.9.7 (#5694)
Co-authored-by: pyup-bot <16239342+pyup-bot@users.noreply.github.com>
2025-02-21 17:09:09 +00:00
Bruno Alla
cc0bd38eff Port some changes from Ruff 2025-02-18 22:40:22 +00:00
Bruno Alla
425520956d Use 2 spaces indentation in toml files 2025-02-18 22:38:20 +00:00
Bruno Alla
ec4e519795 Fix indentation in generated pyproject.toml 2025-02-18 22:37:16 +00:00
Bruno Alla
907ee6a607 Fix issues from Ruff in docs config 2025-02-18 22:36:17 +00:00
Bruno Alla
f30c3c036c Fix issues from Ruff in scripts 2025-02-18 22:35:10 +00:00
github-actions
1a81521ae8 Release 2025.02.17 2025-02-18 02:26:25 +00:00
pyup.io bot
0299f98693
Update sentry-sdk from 2.21.0 to 2.22.0 (#5692) 2025-02-17 19:28:34 +00:00
pyup.io bot
c448ff5ae6
Update django-storages to 1.14.5 (#5690) 2025-02-17 08:45:59 +00:00
github-actions
65b16c82c0 Release 2025.02.14 2025-02-15 02:25:44 +00:00
dependabot[bot]
08d1a3ba61
Bump node from 22.13 to 22.14 (#5688) 2025-02-14 07:58:21 +00:00
Bruno Alla
d8f3ad04f4 Allow to run workflow manually 2025-02-14 07:18:14 +00:00
github-actions
39f882ffb0 Release 2025.02.13 2025-02-14 02:26:43 +00:00
pyup.io bot
9653f1df97
Update sentry-sdk to 2.21.0 (#5687) 2025-02-13 10:50:07 +00:00
github-actions
4978690ae1 Release 2025.02.11 2025-02-12 02:26:33 +00:00
pyup.io bot
0e35c6f3b1
Update coverage to 7.6.12 (#5686) 2025-02-11 18:04:54 +00:00
github-actions
1ec8ef58dd Release 2025.02.10 2025-02-11 02:27:17 +00:00
pyup.io bot
a76b8fe8c8
Update pytest-django to 4.10.0 (#5684) 2025-02-10 16:53:01 +00:00
pyup.io bot
eb2daaa132
Update ruff to 0.9.6 (#5683)
Co-authored-by: pyup-bot <16239342+pyup-bot@users.noreply.github.com>
2025-02-10 15:28:24 +00:00
dependabot[bot]
ecbcd763a8
Bump amazon/aws-cli from 2.23.0 to 2.24.0 (#5682) 2025-02-10 08:59:04 +00:00
github-actions
7977437563 Release 2025.02.08 2025-02-09 02:28:01 +00:00
pyup.io bot
9544a2243b
Update coverage from 7.6.10 to 7.6.11 (#5681) 2025-02-08 22:03:33 +00:00
github-actions
431a4bd10c Release 2025.02.07 2025-02-08 02:23:22 +00:00
Bruno Alla
a06ed7ae76 Replace local pre-commit hook by GH action 2025-02-07 23:19:12 +00:00
pyup.io bot
13acd682cc
Update mypy to 1.15.0 (#5664)
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2025-02-07 23:17:51 +00:00
pyup.io bot
67b3a7b9f3
Update django-stubs to 5.1.3 (#5680) 2025-02-07 23:10:08 +00:00
dependabot[bot]
1962169f57
Bump python from 3.12.8 to 3.12.9 in local Docker image (#5678)
Bumps python from 3.12.8-slim-bookworm to 3.12.9-slim-bookworm.

---
updated-dependencies:
- dependency-name: python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-07 23:09:13 +00:00
dependabot[bot]
bcf96d432f
Bump python from 3.12.8 to 3.12.9 in production Docker image (#5677)
Bumps python from 3.12.8-slim-bookworm to 3.12.9-slim-bookworm.

---
updated-dependencies:
- dependency-name: python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-07 23:08:38 +00:00
dependabot[bot]
d04d3802f3
Bump python from 3.12.8 to 3.12.9 in docs Docker image (#5676)
Bumps python from 3.12.8-slim-bookworm to 3.12.9-slim-bookworm.

---
updated-dependencies:
- dependency-name: python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-07 23:07:51 +00:00
pyup.io bot
978455aa94
Update django-allauth to 65.4.1 (#5679)
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2025-02-07 11:08:49 +00:00
Bruno Alla
08cf6f72e5 Update node version in production docker file 2025-02-07 10:12:43 +00:00
pyup.io bot
f79dbf9e17
Update django-cors-headers to 4.7.0 (#5675) 2025-02-07 10:03:58 +00:00
pyup.io bot
36b7e7754d
Update whitenoise to 6.9.0 (#5674) 2025-02-07 10:03:48 +00:00
github-actions
c37b46e5cf Release 2025.02.06 2025-02-07 02:27:02 +00:00
pyup.io bot
17e5ad3f17
Update ruff to 0.9.5 (#5673)
* Update ruff from 0.9.4 to 0.9.5

* Align Ruff versions

---------

Co-authored-by: pyup-bot <16239342+pyup-bot@users.noreply.github.com>
2025-02-06 22:55:52 +00:00
browniebroke
bde74225a3 Update Contributors 2025-02-06 22:23:31 +00:00
Alan Cyment
8a019b40cf
Bumped node version of Django Dockerfile to 22.13 (#5672) 2025-02-06 22:23:12 +00:00
github-actions
6b8545a95d Release 2025.02.05 2025-02-06 02:26:42 +00:00
pyup-bot
0be2d9c919 Update django from 5.0.11 to 5.0.12 2025-02-05 14:14:38 -03:00
Hana Belay
7c6dff3b70
Add missing trailing slash in test MEDIA_URL (#5666) 2025-02-05 10:57:30 +00:00
github-actions
e0da2963c3 Release 2025.02.03 2025-02-04 02:25:06 +00:00
dependabot[bot]
bcd27ef206
Bumps traefik from 3.3.2 to 3.3.3 (#5660) 2025-02-03 11:13:09 +00:00
pyup.io bot
7371becfcf
Update factory-boy to 3.3.2 (#5661) 2025-02-03 11:11:47 +00:00
github-actions
633762d9d5 Release 2025.01.30 2025-01-31 02:24:55 +00:00
pyup.io bot
0299266df9
Update ruff to 0.9.4 (#5659) 2025-01-30 20:54:37 +00:00
github-actions
bf2a3c5d84 Release 2025.01.26 2025-01-27 02:26:26 +00:00
Ed Morley
f95ef4f8dc
Update Heroku deployment guide (#5656)
* Remove setting of `PYTHONHASHSEED` env var, since it's defaulted to `random` since Python 3.3. See: 
  https://docs.python.org/3.13/whatsnew/3.3.html#builtin-functions-and-types
* Remove setting of `WEB_CONCURRENCY` env var to a hardcoded value, since on Heroku the Python buildpack dynamically sets the value at container boot based on the available CPUs, so it's best to not override the default with a value that might not match the size of the dyno. See: 
  https://devcenter.heroku.com/articles/python-concurrency#default-settings-and-behavior
2025-01-26 13:38:08 +00:00
browniebroke
b5b24db9d2 Update Contributors 2025-01-26 13:35:23 +00:00
Ed Morley
827d35708b
Migrate generated project from runtime.txt to .python-version (#5652)
Heroku now supports the `.python-version` file as an alternative to the
Heroku-specific (and now deprecated) `runtime.txt` file, and recommends
apps switch to using the former since it's more widely supported by other
tooling.

The `.python-version` file is supported by pyenv, uv, the GitHub Actions
`setup-python` action and many others.

In addition, the `.python-version` file supports the version being specified
as just the major version (eg `3.12` vs `3.12.N`) which means will pick up
Python patch updates automatically (which is the recommended usage on
Heroku).

See:
https://devcenter.heroku.com/changelog-items/3005
https://github.com/heroku/heroku-buildpack-python/issues/1642
https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-the-python-version-file-input
2025-01-26 13:35:04 +00:00
github-actions
70bd35d398 Release 2025.01.24 2025-01-25 02:21:10 +00:00
pyup.io bot
d7c995b873
Update ruff to 0.9.3 (#5654)
* Update ruff from 0.9.2 to 0.9.3

* Align Ruff versions

* Align Ruff versions

---------

Co-authored-by: pyup-bot <16239342+pyup-bot@users.noreply.github.com>
Co-authored-by: browniebroke <861044+browniebroke@users.noreply.github.com>
2025-01-24 07:50:53 +00:00
github-actions
bb6e4085c7 Release 2025.01.21 2025-01-22 02:26:55 +00:00
ghazi-git
723a388f3d
Update the linter error code from TCH to TC (#5651) 2025-01-21 19:50:33 +00:00
pyup.io bot
3e1e6cb41b
Update pre-commit to 4.1.0 (#5650)
* Update pre-commit from 4.0.1 to 4.1.0

* Update pre-commit version in template

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2025-01-21 10:08:29 +00:00
github-actions
a691219456 Release 2025.01.20 2025-01-21 02:24:53 +00:00
Bruno Alla
a1105d9010
Migrate post-generation hook to pathlib (#5648)
* Migrate post-generation hook to pathlib

* Fix typo in folder name
2025-01-20 19:06:28 +00:00
Bruno Alla
7f4211ab16
Migrate test generation to pathlib (#5649) 2025-01-20 13:28:59 +00:00
Jelmer
1cad7df6cc
Merge pull request #5615 from browniebroke/refactor/move-api-tests
Group all API tests under a `tests.api` namespace
2025-01-20 14:00:31 +01:00
github-actions
2193a661c5 Release 2025.01.16 2025-01-17 02:23:58 +00:00
pyup.io bot
e69d77a0b9
Update ruff to 0.9.2 (#5646) 2025-01-16 13:59:24 +00:00
dependabot[bot]
54e0ccec0c
Bump amazon/aws-cli from 2.22.1 to 2.23.0 (#5645) 2025-01-16 07:32:55 +00:00
github-actions
185f18dfc0 Release 2025.01.15 2025-01-16 02:24:24 +00:00
pyup.io bot
ab475a5570
Update psycopg to 3.2.4 (#5644) 2025-01-15 23:13:38 +00:00
ghazi-git
564ca18e56
update CELERYD_HIJACK_ROOT_LOGGER to CELERY_WORKER_HIJACK_ROOT_LOGGER (#5643)
CELERYD_HIJACK_ROOT_LOGGER was the name of the setting in celery v3
2025-01-15 19:34:23 +00:00
pyup.io bot
fbf6c886cb
Update django-stubs to 5.1.2 (#5639) 2025-01-15 10:02:53 +00:00
dependabot[bot]
2dc567d131
Bump traefik from 3.3.1 to 3.3.2 (#5642) 2025-01-15 10:00:20 +00:00
github-actions
7a85931fb0 Release 2025.01.14 2025-01-15 02:25:13 +00:00
pyup.io bot
c89a45c45f
Update django from 5.0.10 to 5.0.11 (#5640) 2025-01-14 17:54:03 +00:00
pyup.io bot
1ba44e9e03
Update sentry-sdk to 2.20.0 (#5638) 2025-01-14 12:05:21 +00:00
pyup.io bot
42febc9e84
Update django-debug-toolbar from 4.4.6 to 5.0.1 (#5636) 2025-01-14 07:32:51 +00:00
github-actions
843f268c4d Release 2025.01.13 2025-01-14 02:23:40 +00:00
pyup.io bot
a8847158c9
Update django-environ from 0.11.2 to 0.12.0 (#5635) 2025-01-13 18:06:11 +00:00
dependabot[bot]
d78dff4969
Bumps traefik from 3.3.0 to 3.3.1 (#5634) 2025-01-13 09:41:21 +00:00
github-actions
cb4a277136 Release 2025.01.11 2025-01-12 02:31:00 +00:00
pyup.io bot
35dacd8718
Update ruff to 0.9.1 (#5633) 2025-01-11 12:08:23 +00:00
browniebroke
01650ddc1b Align Ruff versions 2025-01-11 12:00:31 +00:00
Bruno Alla
e7edde03ba Add workflow to keep Ruff version up to date 2025-01-11 12:00:31 +00:00
Bruno Alla
33aa0c0639 Add script to automatically keep ruff versions up-to-date 2025-01-11 12:00:31 +00:00
Bruno Alla
6047eeff3d Keep full version in pyproject-fmt 2025-01-11 12:00:31 +00:00
pyup-bot
8fd6404901 Update ruff from 0.8.6 to 0.9.0 2025-01-11 12:00:31 +00:00
github-actions
5eba578860 Release 2025.01.10 2025-01-11 02:27:14 +00:00
pyup.io bot
0d6de8f23b
Update watchfiles to 1.0.4 (#5631) 2025-01-10 14:17:10 +00:00
github-actions
9cd3d10776 Release 2025.01.09 2025-01-10 02:29:16 +00:00
Bruno Alla
1dbaeaa09d
Merge pull request #5627 from cookiecutter/dependabot/docker/{{cookiecutter.project_slug}}/compose/local/node/node-22.13-bookworm-slim
Bump node from 22.12 to 22.13
2025-01-09 22:29:48 +00:00
pre-commit-ci[bot]
2d54690d34 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-01-09 21:24:10 +00:00
Bruno Alla
d39bb8ae16 Add pre-commit hook to keep node version up to date 2025-01-09 21:22:21 +00:00
Bruno Alla
bb7bffec63 Add script to automatically keep node version up-to-date 2025-01-09 21:21:42 +00:00
Bruno Alla
c5b60d27cf
Merge pull request #5614 from browniebroke/drop-python-2-hooks
Drop support for Python 2 in template generation hooks
2025-01-09 20:52:46 +00:00
dependabot[bot]
cee86b68b1
Bump node in /{{cookiecutter.project_slug}}/compose/local/node
Bumps node from 22.12-bookworm-slim to 22.13-bookworm-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-08 05:52:28 +00:00
github-actions
7324393b15 Release 2025.01.07 2025-01-08 02:27:20 +00:00
dependabot[bot]
38639e251e
Bump traefik from 3.2.3 to 3.3.0 (#5625) 2025-01-07 09:55:30 +00:00
Bruno Alla
b9eb7c8eca
Set minimum_pre_commit_version in pre-commit config (#5626) 2025-01-07 09:54:39 +00:00
github-actions
d50dd24e90 Release 2025.01.06 2025-01-07 02:28:28 +00:00
browniebroke
6e46acc466 Update Contributors 2025-01-06 14:49:24 +00:00
Hana Belay
570763e7ce
Add justfile for use with docker (#5621) 2025-01-06 14:49:01 +00:00
github-actions
e4b00c26d7 Release 2025.01.04 2025-01-05 02:30:04 +00:00
pyup.io bot
95c3772b3e
Update ruff to 0.8.6 (#5622) 2025-01-04 19:35:10 +00:00
github-actions
3ef84f1a26 Release 2025.01.02 2025-01-03 02:27:46 +00:00
browniebroke
b0e12c9cea Update Contributors 2025-01-02 20:44:26 +00:00
Pulse-Mind
411e92cf9d
Fix logging configuration for Celery tasks (#5563) 2025-01-02 20:44:08 +00:00
Bruno Alla
0434aea33f Rename API docs tests to not mention Swagger 2025-01-02 20:20:08 +00:00
pyup.io bot
df2bd97a24
Update ruff to 0.8.5 (#5619) 2025-01-02 18:13:06 +00:00
pyup.io bot
f8d267a78c
Update pillow to 11.1.0 (#5617) 2025-01-02 10:57:12 +00:00
Bruno Alla
683f207d4a Move API tests into a package
Mirroring the structure of the code being tested
2024-12-31 13:27:02 +00:00
Bruno Alla
a623f7bbc6 Drop support for Python 2 in template generation hooks 2024-12-31 12:58:13 +00:00
Bruno Alla
5b4e769354
Update a bunch of dependencies in the template project (#5612) 2024-12-31 10:47:47 +00:00
Bruno Alla
33f32b06d9
Fix missing update from uv.lock during release process (#5611) 2024-12-31 09:57:53 +00:00
Bruno Alla
7e0f4c165d
Bump Jinja from 3.1.4 to 3.1.5 (#5610) 2024-12-31 09:50:08 +00:00
github-actions
e3929b15e4 Release 2024.12.27 2024-12-28 02:25:06 +00:00
pyup.io bot
f9298f9b99
Update coverage from 7.6.9 to 7.6.10 (#5608) 2024-12-27 11:19:22 +00:00
pyup.io bot
4dcc9e786f
Update uvicorn-worker from 0.2.0 to 0.3.0 (#5607) 2024-12-27 11:19:02 +00:00
github-actions
2b09e6bb41 Release 2024.12.26 2024-12-27 02:27:37 +00:00
pyup-bot
fd9dd32d28 Update collectfasta from 3.2.0 to 3.2.1 2024-12-26 08:48:10 -03:00
pyup.io bot
e9f4ba8ae5
Update django-allauth from 65.3.0 to 65.3.1 (#5605) 2024-12-26 09:50:26 +00:00
github-actions
250a28bca8 Release 2024.12.24 2024-12-25 02:26:31 +00:00
pyup.io bot
61ffcbf163
Update djlint to 1.36.4 (#5603) 2024-12-24 14:27:11 +00:00
pyup.io bot
1787fe31d2
Update uvicorn from 0.32.1 to 0.34.0 (#5592) 2024-12-24 14:22:18 +00:00
github-actions
a7362a0838 Release 2024.12.23 2024-12-24 02:27:39 +00:00
dependabot[bot]
fc68927672
Bump astral-sh/setup-uv from 4 to 5 (#5602) 2024-12-23 09:31:31 +00:00
dependabot[bot]
df7fcce28f
Bump webpack-cli from 5.1.4 to 6.0.1 (#5601) 2024-12-23 09:27:51 +00:00
github-actions
b1bc92ff2c Release 2024.12.20 2024-12-21 02:25:40 +00:00
pyup.io bot
92491bc4ad
Update ruff to 0.8.4 (#5595) 2024-12-20 11:04:28 +00:00
github-actions
fb7b05afae Release 2024.12.17 2024-12-18 02:30:48 +00:00
pyup.io bot
6c20b26773
Update djangorestframework-stubs from 3.15.1 to 3.15.2 (#5591) 2024-12-17 08:42:47 +00:00
dependabot[bot]
a40c4e8588
Bump traefik from 3.2.2 to 3.2.3 (#5594) 2024-12-17 08:40:25 +00:00
github-actions[bot]
8245b0c147
Auto-update pyupgrade pre-commit hook (#5593) 2024-12-17 08:39:08 +00:00
github-actions
c17fef651f Release 2024.12.12 2024-12-13 02:33:08 +00:00
pyup.io bot
35bed843b8
Update ruff to 0.8.3 (#5587) 2024-12-12 23:17:39 +00:00
github-actions
72cb463ace Release 2024.12.11 2024-12-12 02:32:46 +00:00
dependabot[bot]
1b62f5b329
Bump traefik (#5586) 2024-12-11 14:33:28 +00:00
github-actions
1702b79b8c Release 2024.12.10 2024-12-11 02:32:47 +00:00
pyup.io bot
bb38f34c70
Update watchfiles from 1.0.0 to 1.0.3 (#5585) 2024-12-10 23:42:34 +00:00
dependabot[bot]
736ff7659d
Bump node from 22.11 to 22.12 (#5583) 2024-12-10 23:42:16 +00:00
github-actions
9ce93909a3 Release 2024.12.08 2024-12-09 02:34:03 +00:00
pyup.io bot
277bb8f475
Update ruff to 0.8.2 (#5576) 2024-12-08 15:20:23 +00:00
pyup.io bot
8ce5908229
Update coverage to 7.6.9 (#5581) 2024-12-08 14:49:57 +00:00
pyup.io bot
c187975e1d
Update sentry-sdk to 2.19.2 (#5579) 2024-12-08 14:49:40 +00:00
dependabot[bot]
402fd66165
Bump python in /{{cookiecutter.project_slug}}/compose/production/django (#5575) 2024-12-08 14:48:59 +00:00
dependabot[bot]
2c835f0ed5
Bump python from 3.12.7 to 3.12.8 in local Docker image (#5574) 2024-12-08 14:48:42 +00:00
dependabot[bot]
47bc51274d
Bump python from 3.12.7 to 3.12.8 in docs Docker image (#5573) 2024-12-08 14:48:19 +00:00
pyup.io bot
8c02bf8f93
Update hiredis to 3.1.0 (#5571) 2024-12-08 14:48:05 +00:00
pyup.io bot
f63daa7eb1
Update redis to 5.2.1 (#5580)
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2024-12-08 14:47:45 +00:00
Bruno Alla
cedbcbd0bf
Merge pull request #5572 from cookiecutter/pyup-update-django-5.0.9-to-5.0.10
Update django to 5.0.10
2024-12-08 15:39:13 +01:00
Bruno Alla
da24b3aa3f
Merge branch 'master' into pyup-update-django-5.0.9-to-5.0.10 2024-12-08 15:32:18 +01:00
pyup.io bot
a41bbee492
Update drf-spectacular to 0.28.0 (#5564) 2024-12-08 14:32:03 +00:00
Bruno Alla
b25ab14385
Pin node to version 22.11 (#5582)
* Add --rm to all docker run commands in CI

* Pin node 22 version to 22.11
2024-12-08 13:30:39 +01:00
pyup-bot
7e4ba42e6e Update django from 5.0.9 to 5.0.10 2024-12-04 15:46:56 +00:00
github-actions
857bcb6895 Release 2024.12.03 2024-12-04 02:32:42 +00:00
github-actions[bot]
eee987e1b4
Update django-upgrade to 1.22.2 (#5567) 2024-12-03 07:16:10 +00:00
github-actions
d43c73aeb6 Release 2024.12.02 2024-12-03 02:32:54 +00:00
pyup.io bot
3eacd55bf7
Update pytest to 8.3.4 (#5566) 2024-12-02 08:31:15 +00:00
github-actions
d7fe509ce9 Release 2024.12.01 2024-12-02 02:33:35 +00:00
pyup.io bot
9f34c18ffe
Update django-allauth to 65.3.0 (#5565) 2024-12-01 16:42:42 +00:00
github-actions
9465a18868 Release 2024.11.29 2024-11-30 02:29:43 +00:00
pyup.io bot
017c9ae6f8
Update ruff to 0.8.1 (#5557) 2024-11-29 09:20:53 +00:00
pyup.io bot
4dd166267d
Update djlint to 1.36.3 (#5558) 2024-11-29 08:51:35 +00:00
github-actions
7675287041 Release 2024.11.28 2024-11-29 02:31:54 +00:00
github-actions[bot]
606db119cd
Update djlint pre-commit hook to 1.36.2 (#5556) 2024-11-28 14:20:39 +00:00
pyup-bot
f0b50fb735 Update djlint from 1.36.1 to 1.36.2 2024-11-28 10:27:33 -03:00
github-actions
054eebf510 Release 2024.11.27 2024-11-28 02:31:56 +00:00
Bruno Alla
6a526ac633
Pin dart-sass to 1.77.6 to avoid deprecation warnings (#5552)
https://github.com/twbs/bootstrap/issues/40962
https://github.com/twbs/bootstrap/issues/40849
2024-11-27 21:18:33 +00:00
dependabot[bot]
88ba893524
Bump gulp-imagemin from 7.1.0 to 9.1.0 (#5052) 2024-11-27 18:37:39 +00:00
dependabot[bot]
0de4a2f6eb
Bump gulp from 4.0.2 to 5.0.0 (#4949) 2024-11-27 18:27:50 +00:00
github-actions
c02a16d6bf Release 2024.11.26 2024-11-27 02:32:12 +00:00
pyup.io bot
07061b6e2f
Update coverage to 7.6.8 (#5547) 2024-11-26 17:52:16 +00:00
pyup.io bot
c05770a4dc
Update watchfiles to 1.0.0 (#5548) 2024-11-26 17:51:57 +00:00
dependabot[bot]
575d4c3809
Bump astral-sh/setup-uv from 3 to 4 (#5549) 2024-11-25 12:47:25 +00:00
github-actions
4617cd2212 Release 2024.11.22 2024-11-23 02:28:37 +00:00
pyup.io bot
b09ee5be8a
Update ruff to 0.8.0 (#5545) 2024-11-22 12:48:20 +00:00
github-actions
be2fdb2984 Release 2024.11.21 2024-11-22 02:30:53 +00:00
pyup.io bot
aca580df00
Update sentry-sdk to 2.19.0 (#5543) 2024-11-21 18:16:44 +00:00
browniebroke
cbead91fdc Update Contributors 2024-11-21 12:55:15 +00:00
qwerrrqw
7fc33c2a23
Add support for secure Redis (TLS support) (#5526) 2024-11-21 12:54:50 +00:00
pyup.io bot
d00cd42e6c
Update uvicorn to 0.32.1 (#5539) 2024-11-21 12:29:46 +00:00
dependabot[bot]
dc8a470a8f
Bump traefik from 3.2.0 to 3.2.1 (#5541) 2024-11-21 12:29:07 +00:00
github-actions
b1de740dff Release 2024.11.20 2024-11-21 02:30:23 +00:00
browniebroke
6215f17382 Update Contributors 2024-11-20 16:25:27 +00:00
Denis Darii
f440144fde
Fix typos in translation instructions in README (#5538) 2024-11-20 16:25:04 +00:00
dependabot[bot]
c97df5f755
Bump amazon/aws-cli (#5537) 2024-11-20 08:50:57 +00:00
Bruno Alla
28ec065561
Fix broken links in README
Fix #5535
2024-11-19 07:42:58 +00:00
github-actions
3b490ffd2f Release 2024.11.16 2024-11-17 02:31:56 +00:00
pyup.io bot
c357d9ef33
Update ruff to 0.7.4 (#5531) 2024-11-16 11:00:01 +00:00
github-actions
0bb37a3f1f Release 2024.11.15 2024-11-16 02:29:26 +00:00
pyup.io bot
1b9f3e7a48
Update coverage to 7.6.5 (#5529) 2024-11-15 09:46:37 +00:00
github-actions
d3ffe31bd0 Release 2024.11.14 2024-11-15 02:30:57 +00:00
dependabot[bot]
e03b0b0c7e
Bump amazon/aws-cli (#5528) 2024-11-14 07:56:59 +00:00
github-actions
08ba595f87 Release 2024.11.13 2024-11-14 02:28:06 +00:00
pyup.io bot
c5988b5c3c
Update werkzeug to 3.1.3 (#5524) 2024-11-13 10:38:33 +00:00
pyup.io bot
73f41e2425
Update ruff to 0.7.3 (#5521) 2024-11-13 10:05:52 +00:00
dependabot[bot]
555872e1c9
Bump amazon/aws-cli from 2.19.0 to 2.20.0 (#5527) 2024-11-13 10:04:53 +00:00
Bruno Alla
868db771f3
Merge pull request #5523 from cookiecutter/pyup-update-django-allauth-65.1.0-to-65.2.0 2024-11-13 10:04:32 +00:00
github-actions
cf375e934b Release 2024.11.08 2024-11-09 02:23:39 +00:00
pyup-bot
b932c9bf15 Update django-allauth from 65.1.0 to 65.2.0 2024-11-08 13:51:11 +00:00
github-actions
4e506b44f1 Release 2024.11.07 2024-11-08 02:26:52 +00:00
pyup.io bot
8d6c8ebed1
Update djlint to 1.36.1 (#5519) 2024-11-07 19:43:37 +00:00
github-actions
f8954e8a47 Release 2024.11.05 2024-11-06 02:26:15 +00:00
pyup.io bot
1e0c9ff2c1
Update djlint to 1.36.0 (#5517) 2024-11-05 08:21:05 +00:00
github-actions
06bfd2ebaa Release 2024.11.04 2024-11-05 02:26:45 +00:00
pyup.io bot
dd98112051
Update sentry-sdk to 2.18.0 (#5515) 2024-11-04 18:09:28 +00:00
github-actions
51ce542796 Release 2024.11.02 2024-11-03 02:30:16 +00:00
pyup.io bot
5136d3da99
Update ruff to 0.7.2 (#5510) 2024-11-02 18:51:49 +00:00
github-actions
f2a45a3ee7 Release 2024.11.01 2024-11-02 02:26:45 +00:00
pyup.io bot
33a7478559
Update djlint to 1.35.4 (#5508)
Co-authored-by: browniebroke <861044+browniebroke@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-01 12:21:39 +00:00
dependabot[bot]
8d5a4269fc
Bump amazon/aws-cli from 2.18.1 to 2.19.0 (#5507)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 09:55:01 +00:00
Bruno Alla
6b8d4dc856
Replace docs extra by docs dependency group from PEP 735 (#5493) 2024-10-31 19:57:08 +00:00
github-actions
4c95392321 Release 2024.10.30 2024-10-31 02:29:26 +00:00
github-actions[bot]
6b7c4aebda
Update pyproject-fmt pre-commit hook to v2.5.0 (#5505)
Co-authored-by: browniebroke <861044+browniebroke@users.noreply.github.com>
2024-10-30 17:01:41 +00:00
pyup.io bot
14ba82423e
Update djlint to 1.35.3 (#5503) 2024-10-30 13:19:12 +00:00
pyup.io bot
46795883b5
Update whitenoise from 6.8.1 to 6.8.2 (#5501) 2024-10-30 07:47:48 +00:00
browniebroke
5f9acfdf47 Update Contributors 2024-10-30 07:13:42 +00:00
Christian Jensen
9bef46c198
Small spelling correction (#5502)
Mimicing > Mimicking
2024-10-30 07:13:20 +00:00
github-actions
571f8787eb Release 2024.10.29 2024-10-30 02:28:45 +00:00
Bruno Alla
a062a146df
Merge pull request #5499 from cookiecutter/pyup-update-django-cors-headers-4.5.0-to-4.6.0
Update django-cors-headers to 4.6.0
2024-10-29 12:28:31 +00:00
pyup-bot
b40566e401 Update django-cors-headers from 4.5.0 to 4.6.0 2024-10-29 12:00:39 +00:00
Bruno Alla
63044a04cd
Merge pull request #5497 from cookiecutter/pyup-update-whitenoise-6.7.0-to-6.8.1 2024-10-29 08:45:01 +00:00
Bruno Alla
ab7f01c4d1
Merge pull request #5498 from cookiecutter/dependabot/docker/{{cookiecutter.project_slug}}/compose/production/traefik/traefik-3.2.0 2024-10-29 08:44:44 +00:00
dependabot[bot]
272ef407d6
Bump traefik
Bumps traefik from 3.1.6 to 3.2.0.

---
updated-dependencies:
- dependency-name: traefik
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-29 05:09:08 +00:00
pyup-bot
4377481f32 Update whitenoise from 6.7.0 to 6.8.1 2024-10-28 15:57:36 +00:00
github-actions
fb27881b33 Release 2024.10.26 2024-10-27 02:30:32 +00:00
Bruno Alla
d40abd321e
Merge pull request #5495 from cookiecutter/pyup-update-django-stubs-5.1.0-to-5.1.1
Update django-stubs to 5.1.1
2024-10-27 00:50:48 +01:00
Bruno Alla
f4afaf5ba3
Merge branch 'pyup-update-mypy-1.11.2-to-1.13.0' into pyup-update-django-stubs-5.1.0-to-5.1.1 2024-10-27 00:43:31 +01:00
Bruno Alla
231940644e
Merge branch 'master' into pyup-update-mypy-1.11.2-to-1.13.0 2024-10-27 00:39:35 +01:00
pyup-bot
e86fd33633 Update django-stubs from 5.1.0 to 5.1.1 2024-10-26 20:41:35 +01:00
pyup.io bot
19294ef8a0
Update werkzeug to 3.0.6 (#5492) 2024-10-26 12:57:56 +01:00
github-actions
60cc312918 Release 2024.10.25 2024-10-26 02:25:46 +00:00
Jelmer
17a1bf7e38
Merge pull request #5489 from cookiecutter/pyup-update-werkzeug-3.0.4-to-3.0.5
Update werkzeug to 3.0.5 and unpin watchdog<5
2024-10-25 10:15:51 +02:00
Bruno Alla
428fac8776
Remove watchdog pin <4
The issue that lead to this pinning should be fixed now: https://github.com/pallets/werkzeug/issues/2945
2024-10-25 09:01:28 +01:00
github-actions[bot]
0384b8f001
Auto-update pre-commit hooks (#5490)
Co-authored-by: browniebroke <861044+browniebroke@users.noreply.github.com>
2024-10-25 08:57:01 +01:00
github-actions
33a707dd9f Release 2024.10.24 2024-10-25 02:28:42 +00:00
pyup-bot
fb6549dc4d Update werkzeug from 3.0.4 to 3.0.5 2024-10-25 03:25:21 +01:00
pyup.io bot
109238f746
Update ruff to 0.7.1 (#5487) 2024-10-24 19:48:35 +01:00
pyup.io bot
244d7ac9cd
Update redis to 5.2.0 (#5486) 2024-10-24 17:30:20 +01:00
pyup.io bot
ceafff014e
Update django-allauth from 65.0.2 to 65.1.0 (#5485) 2024-10-24 07:44:01 +01:00
github-actions
b4737acb6d Release 2024.10.22 2024-10-23 02:28:14 +00:00
pyup-bot
fd05b1de21 Update mypy from 1.11.2 to 1.13.0 2024-10-23 01:14:36 +01:00
github-actions[bot]
edd8a8b315
Auto-update pre-commit hooks (#5483)
Co-authored-by: browniebroke <861044+browniebroke@users.noreply.github.com>
2024-10-22 07:39:35 +01:00
browniebroke
2533f72d61 Update Contributors 2024-10-22 06:39:29 +00:00
Mariot Tsitoara
020639f86f
Fix broken links in generated README.md (#5482) 2024-10-22 07:39:07 +01:00
github-actions
a829571997 Release 2024.10.21 2024-10-22 02:28:34 +00:00
Jelmer
9806ba7a36
Merge pull request #4861 from foarsitter/remove_celery_broker_url
Remove CELERY_BROKER_URL in favor of REDIS_URL
2024-10-21 22:21:25 +02:00
Jelmer Draaijer
8bf9a8c278 Add a default for REDIS_URL and add it as a variable to the settings 2024-10-21 22:10:42 +02:00
pyup.io bot
02f6336d74
Update coverage to 7.6.4 (#5480) 2024-10-21 10:12:40 +01:00
Bruno Alla
6f5f1b8576
Fix a number of issues with Azure storage (#5476) 2024-10-21 10:12:29 +01:00
github-actions
1b83a472ec Release 2024.10.17 2024-10-18 02:28:50 +00:00
Bruno Alla
8c1fac1b2e
Run uv lock when updating template version (#5478) 2024-10-17 21:38:22 +01:00
pyup.io bot
abc199d5ef
Update ruff to 0.7.0 (#5474) 2024-10-17 21:29:12 +01:00
github-actions[bot]
ca405049ad
Auto-update pre-commit hooks (#5475)
Co-authored-by: browniebroke <861044+browniebroke@users.noreply.github.com>
2024-10-17 19:10:50 +01:00
pyup.io bot
ae86e01779
Update uvicorn to 0.32.0 (#5471) 2024-10-17 12:52:53 +01:00
pyup.io bot
dc4d102477
Update pillow to 11.0.0 (#5470) 2024-10-17 12:52:42 +01:00
pyup.io bot
ff7874b316
Update sentry-sdk to 2.17.0 (#5473) 2024-10-17 12:52:13 +01:00
github-actions
67af42be0c Release 2024.10.15 2024-10-16 02:29:09 +00:00
github-actions[bot]
16b2c16b52
Auto-update pre-commit hooks (#5469)
Co-authored-by: browniebroke <861044+browniebroke@users.noreply.github.com>
2024-10-15 09:27:16 +01:00
github-actions
deb813ca05 Release 2024.10.14 2024-10-15 02:28:45 +00:00
Jelmer Draaijer
4709a30bd7 Remove CELERY_BROKER_URL in favor of REDIS_URL 2024-10-14 20:38:32 +02:00
Jelmer
62f39cda5e
Merge pull request #5463 from cookiecutter/pyup-update-sphinx-8.1.1-to-8.1.3
Update sphinx to 8.1.3
2024-10-14 20:34:10 +02:00
Jelmer
8831a8bd11
Merge pull request #5464 from cookiecutter/pyup-update-coverage-7.6.2-to-7.6.3
Update coverage to 7.6.3
2024-10-14 20:34:00 +02:00
pyup-bot
057562bf26 Update sphinx from 8.1.1 to 8.1.3 2024-10-14 19:33:59 +02:00
pyup-bot
04d6620733 Update coverage from 7.6.2 to 7.6.3 2024-10-14 19:33:48 +02:00
Jelmer
ccb0d974ed
Merge pull request #5467 from cookiecutter/5465-missing-os-requirements-for-ubuntu-latest
Add requirements for ubuntu 24.04
2024-10-14 19:33:17 +02:00
Jelmer Draaijer
b042b212b6 Add requirements for ubuntu 24.04 2024-10-14 19:12:10 +02:00
github-actions
a0c8863a9c Release 2024.10.12 2024-10-13 02:30:03 +00:00
Bruno Alla
931e300b63
Pin Python version to 3.12 (#5456)
* Pin Python version to 3.12

* Add back actions/setup-python to bare metal tests

* Revert "Add back actions/setup-python to bare metal tests"

This reverts commit cdee7e2da7.

* Update test_bare.sh to run commands via uv

* Skip uv lock on PRs from forks

* Revert "Update test_bare.sh to run commands via uv"

This reverts commit 56f839e2b4.

* Add back actions/setup-python to bare metal tests

* Only run uv lock workflow on dependabot PRs
2024-10-12 17:46:45 +01:00
Jelmer
822c1c0327
Merge pull request #5457 from cookiecutter/pyup-update-sphinx-8.0.2-to-8.1.1
Update sphinx to 8.1.1
2024-10-12 16:44:16 +02:00
Jelmer
98f4863a25
Merge pull request #5458 from cookiecutter/update/pre-commit-autoupdate
Auto-update pre-commit hooks
2024-10-12 16:44:06 +02:00
Jelmer
c1092f5194
Merge pull request #5459 from cookiecutter/pyup-update-django-cors-headers-4.4.0-to-4.5.0
Update django-cors-headers to 4.5.0
2024-10-12 16:43:58 +02:00
pyup-bot
abfc6b0ee2 Update django-cors-headers from 4.4.0 to 4.5.0 2024-10-12 10:59:48 +01:00
browniebroke
3f2155ab6e Auto-update pre-commit hooks 2024-10-12 02:36:29 +00:00
github-actions
92cf1daaf4 Release 2024.10.11 2024-10-12 02:25:39 +00:00
pyup-bot
209b54a628 Update sphinx from 8.0.2 to 8.1.1 2024-10-12 01:41:04 +01:00
Fábio C. Barrionuevo da Luz
54247e783e Update Nginx dependabot versioning-strategy
as a way to fix #5345 and #5344
2024-10-11 21:40:58 -03:00
luzfcb
6994914572 Update Contributors 2024-10-11 13:21:16 +00:00
Francisco Navarro Morales
b96e118f86 Update README.md broken links
Closes https://github.com/cookiecutter/cookiecutter-django/issues/5453
2024-10-11 10:20:56 -03:00
Jelmer
5fead041df
Merge pull request #5450 from cookiecutter/update/pre-commit-autoupdate
Auto-update pre-commit hooks
2024-10-11 11:45:32 +02:00
Jelmer
2eb0b22530
Merge pull request #5452 from foarsitter/wait-for-it
wait-for-it as dependency in the run stage
2024-10-11 11:45:18 +02:00
jelmert
dcde07d0ca wait-for-it as dependency in the run stage 2024-10-11 09:40:50 +02:00
pre-commit-ci[bot]
bee41248a4 Regenerate uv.lock 2024-10-11 02:39:02 +00:00
pre-commit-ci[bot]
4696302b22 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-11 02:38:44 +00:00
browniebroke
ed184d460a Auto-update pre-commit hooks 2024-10-11 02:38:35 +00:00
github-actions
1ebaddc204 Release 2024.10.10 2024-10-11 02:27:43 +00:00
pyup-bot
f3d4a9fcc7 Update sentry-sdk from 2.15.0 to 2.16.0 2024-10-10 09:42:32 -03:00
dependabot[bot]
44dc46997a
Bump traefik from 3.1.5 to 3.1.6 (#5449)
Bumps traefik from 3.1.5 to 3.1.6.

---
updated-dependencies:
- dependency-name: traefik
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-10 09:50:04 +01:00
github-actions
a0c599d978 Release 2024.10.09 2024-10-10 02:28:06 +00:00
pyup.io bot
0bd606922c
Update coverage to 7.6.2 (#5448) 2024-10-09 18:06:49 +01:00
github-actions
8fb90ab02a Release 2024.10.08 2024-10-09 02:28:04 +00:00
pyup.io bot
b66960ed2d
Update pre-commit to 4.0.1 (#5445) 2024-10-08 21:23:15 +01:00
Jelmer
9ada7ab125
Merge pull request #5443 from cookiecutter/dependabot/docker/{{cookiecutter.project_slug}}/compose/production/aws/amazon/aws-cli-2.18.1
Bump amazon/aws-cli from 2.18.0 to 2.18.1 in /{{cookiecutter.project_slug}}/compose/production/aws
2024-10-08 07:55:01 +02:00
Jelmer
c3ec0b020e
Merge pull request #5441 from cookiecutter/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-10-08 07:54:52 +02:00
Jelmer
6a2effb67c
Merge pull request #5442 from cookiecutter/update/pre-commit-autoupdate
Auto-update pre-commit hooks
2024-10-08 07:54:41 +02:00
Bruno Alla
214e5f5d34
Use uv sync & uv run in docs build (#5440)
* Use uv sync to build the docs with Sphinx
2024-10-08 07:54:24 +02:00
dependabot[bot]
30295fefd2
Bump amazon/aws-cli
Bumps amazon/aws-cli from 2.18.0 to 2.18.1.

---
updated-dependencies:
- dependency-name: amazon/aws-cli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 05:46:01 +00:00
browniebroke
c2caf522b5 Auto-update pre-commit hooks 2024-10-08 02:39:47 +00:00
github-actions
d95f88142c Release 2024.10.07 2024-10-08 02:29:35 +00:00
pre-commit-ci[bot]
49ed4a0267
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 24.8.0 → 24.10.0](https://github.com/psf/black/compare/24.8.0...24.10.0)
2024-10-08 00:48:03 +00:00
Bruno Alla
c115b2e6de
Docs: fix Mailgun include in troubleshooting sections (#5439) 2024-10-07 20:25:38 +01:00
Bruno Alla
2d06ddda95
Migrate docs build to use uv (#5438)
Following the official docs:

https://docs.readthedocs.io/en/latest/build-customization.html#install-dependencies-with-uv
2024-10-07 15:43:09 -03:00
Bruno Alla
3252aa7ae7
Add workflow to run uv lock (#5422)
* Add workflow to keep uv.lock up to date

Should do the job for dependabot updates

* Only run uv lock workflow when GH_PAT is set

* Make a change to pyproject.toml

* Attempt to fix workflow syntax

* Attempt to fix workflow syntax

* Regenerate uv.lock
2024-10-07 11:12:25 +01:00
pyup.io bot
f590d14070
Update sphinx to 8.0.2 (#5263)
* Update sphinx from 7.4.7 to 8.0.2
2024-10-07 10:15:35 +02:00
Jelmer
d879c0b2ba
Merge pull request #5264 from cookiecutter/dependabot/pip/docs/sphinx-8.0.2
Bump sphinx from 7.4.7 to 8.0.2 in /docs
2024-10-07 10:09:22 +02:00
Jelmer
0d9fbfd729
Merge pull request #5432 from cookiecutter/pyup-update-pre-commit-3.8.0-to-4.0.0
Update pre-commit to 4.0.0
2024-10-07 10:07:22 +02:00
Jelmer
f86ebbbf3a
Merge pull request #5433 from cookiecutter/update/pre-commit-autoupdate
Auto-update pre-commit hooks
2024-10-07 10:07:03 +02:00
dependabot[bot]
907bfa5f6b Bump sphinx from 7.4.7 to 8.0.2 in /docs
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.4.7 to 8.0.2.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.4.7...v8.0.2)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 10:03:02 +02:00
Jelmer
877d81d618
Merge pull request #5437 from cookiecutter/pyup-update-sphinx-rtd-theme-2.0.0-to-3.0.0
Update sphinx-rtd-theme to 3.0.0
2024-10-07 10:00:02 +02:00
Jelmer
7d9f58bef5
Merge pull request #5436 from cookiecutter/dependabot/docker/{{cookiecutter.project_slug}}/compose/production/aws/amazon/aws-cli-2.18.0
Bump amazon/aws-cli from 2.17.0 to 2.18.0 in /{{cookiecutter.project_slug}}/compose/production/aws
2024-10-07 09:49:27 +02:00
pyup-bot
1a893456c3 Update sphinx-rtd-theme from 2.0.0 to 3.0.0 2024-10-07 08:49:25 +01:00
Jelmer
d826d2e6f0
Merge pull request #5435 from cookiecutter/dependabot/github_actions/astral-sh/setup-uv-3
Bump astral-sh/setup-uv from 2 to 3
2024-10-07 09:49:20 +02:00
dependabot[bot]
7114a1e1ba
Bump amazon/aws-cli
Bumps amazon/aws-cli from 2.17.0 to 2.18.0.

---
updated-dependencies:
- dependency-name: amazon/aws-cli
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 05:19:00 +00:00
dependabot[bot]
1bbd6d5fe4
Bump astral-sh/setup-uv from 2 to 3
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 2 to 3.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/v2...v3)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 05:13:01 +00:00
browniebroke
29bd84b397 Auto-update pre-commit hooks 2024-10-06 02:40:22 +00:00
github-actions
52ce09e623 Release 2024.10.05 2024-10-06 02:30:10 +00:00
pyup-bot
ba3b48dcd9 Update pre-commit from 3.8.0 to 4.0.0 2024-10-05 21:03:13 +01:00
Jelmer
0cac725ca1
Merge pull request #5356 from foarsitter/uv
Replace pip with uv for the project files
2024-10-05 17:54:47 +02:00
jelmert
9a3e7ebf16 Use --frozen for running scripts to avoid updating the environment 2024-10-05 17:45:50 +02:00
Jelmer Draaijer
5c4abe5b78 Remove actions/setup-python steps because uv run and uv sync take care of installing python. 2024-10-05 17:45:50 +02:00
Jelmer Draaijer
0a291c1ec1 Replace pip with uv for the project files 2024-10-05 17:45:50 +02:00
pyup.io bot
a0af461794
Update crispy-bootstrap5 from 2024.2 to 2024.10 (#5430) 2024-10-05 11:31:15 -03:00
Bruno Alla
b0c45224f1
Group docs into sections (#5426) 2024-10-05 11:29:57 -03:00
Jelmer
6c64a810b4
Merge pull request #5327 from foarsitter/wait_for_it
Use wait-for-it in favor of the custom python script when waiting for postgres
2024-10-05 13:26:44 +02:00
Jelmer
56fce2b0e3
Merge pull request #5425 from cookiecutter/pyup-update-tox-4.20.0-to-4.21.2
Update tox to 4.21.2
2024-10-05 13:23:21 +02:00
Jelmer
37aa462a2d
Merge pull request #5424 from browniebroke/sphinx-auto-build-template
Add sphinx-autobuild to the template project and tidy up make files
2024-10-05 13:22:31 +02:00
github-actions
120ba0d07f Release 2024.10.04 2024-10-05 02:26:51 +00:00
pyup.io bot
732c8784fa
Update ruff to 0.6.9 (#5428) 2024-10-04 19:45:26 +01:00
pyup.io bot
2cbb3bd02d
Update redis to 5.1.1 (#5427) 2024-10-04 19:07:36 +01:00
github-actions
d703580c75 Release 2024.10.03 2024-10-04 02:28:30 +00:00
Bruno Alla
168aae17f2
Update source_suffix mapping 2024-10-03 16:16:16 -03:00
pyup-bot
5e582d0392 Update tox from 4.20.0 to 4.21.2 2024-10-03 19:00:52 +01:00
Bruno Alla
463d671ffc
Add sphinx-autobuild to the template project and tidy up make files 2024-10-03 10:06:36 -03:00
pyup.io bot
33c75ad251
Update sphinx-autobuild to 2024.10.3 (#5420) 2024-10-03 13:35:54 +01:00
dependabot[bot]
6f858e904b
Bump traefik from 3.1.4 to 3.1.5 (#5423)
Bumps traefik from 3.1.4 to 3.1.5.

---
updated-dependencies:
- dependency-name: traefik
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-03 13:35:32 +01:00
github-actions
9bbee5f84d Release 2024.10.02 2024-10-03 02:28:26 +00:00
Bruno Alla
12380e1e80
Update Heroku runtime version to 3.12.7 2024-10-02 12:20:06 +01:00
dependabot[bot]
e0819933ad
Bump python from 3.12.6 to 3.12.7 in docs Docker image (#5416)
Bumps python from 3.12.6-slim-bookworm to 3.12.7-slim-bookworm.

---
updated-dependencies:
- dependency-name: python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 12:19:16 +01:00
dependabot[bot]
ec499fa0ac
Bump python from 3.12.6 to 3.12.7 in local Docker image (#5415)
Bumps python from 3.12.6-slim-bookworm to 3.12.7-slim-bookworm.

---
updated-dependencies:
- dependency-name: python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 12:18:54 +01:00
dependabot[bot]
9379027267
Bump python from 3.12.6 to 3.12.7 production Docker (#5414)
Bumps python from 3.12.6-slim-bookworm to 3.12.7-slim-bookworm.

---
updated-dependencies:
- dependency-name: python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 12:18:28 +01:00
github-actions
f8ef6c6251 Release 2024.10.01 2024-10-02 02:28:03 +00:00
pyup.io bot
faba566d31
Update sentry-sdk to 2.15.0 (#5413) 2024-10-01 17:28:38 +01:00
github-actions
60adaa716d Release 2024.09.29 2024-09-30 02:30:57 +00:00
pyup.io bot
053543d8d2
Update psycopg to 3.2.3 (#5411)
* Update psycopg from 3.2.2 to 3.2.3

* Update psycopg from 3.2.2 to 3.2.3

* Update psycopg from 3.2.2 to 3.2.3
2024-09-29 18:34:27 -04:00
jelmert
6f3b72d691 Use wait-for-it in favor of the custom python script when waiting for postgres 2024-08-27 13:23:06 +02:00
101 changed files with 3234 additions and 980 deletions

View File

@ -12,7 +12,7 @@ trim_trailing_whitespace = true
indent_style = space
indent_size = 4
[*.{html,css,scss,json,yml,xml}]
[*.{html,css,scss,json,yml,xml,toml}]
indent_style = space
indent_size = 2

View File

@ -1648,5 +1648,70 @@
"name": "LJFP",
"github_login": "ljfp",
"twitter_username": ""
},
{
"name": "Francisco Navarro Morales ",
"github_login": "spothound",
"twitter_username": ""
},
{
"name": "Mariot Tsitoara",
"github_login": "mariot",
"twitter_username": ""
},
{
"name": "Christian Jensen",
"github_login": "jensenbox",
"twitter_username": "cjensen"
},
{
"name": "Denis Darii",
"github_login": "DNX",
"twitter_username": ""
},
{
"name": "qwerrrqw",
"github_login": "qwerrrqw",
"twitter_username": ""
},
{
"name": "Pulse-Mind",
"github_login": "pulse-mind",
"twitter_username": ""
},
{
"name": "Hana Belay",
"github_login": "earthcomfy",
"twitter_username": ""
},
{
"name": "Ed Morley",
"github_login": "edmorley",
"twitter_username": ""
},
{
"name": "Alan Cyment",
"github_login": "acyment",
"twitter_username": ""
},
{
"name": "Kawsar Alam Foysal",
"github_login": "iamfoysal",
"twitter_username": ""
},
{
"name": "Igor Jerosimić",
"github_login": "igor-wl",
"twitter_username": ""
},
{
"name": "Pepa",
"github_login": "07pepa",
"twitter_username": ""
},
{
"name": "Aidos Kanapyanov",
"github_login": "aidoskanapyanov",
"twitter_username": ""
}
]

View File

@ -2,23 +2,16 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
enable-beta-ecosystems: true
updates:
# Update Python deps for the template (not the generated project)
- package-ecosystem: "pip"
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "daily"
labels:
- "project infrastructure"
# Update Python deps for the documentation
- package-ecosystem: "pip"
directory: "docs/"
schedule:
interval: "daily"
labels:
- "project infrastructure"
# Update GitHub actions in workflows
- package-ecosystem: "github-actions"
directory: "/"
@ -36,11 +29,11 @@ updates:
- "update"
# Enable version updates for Docker
# We need to specify each Dockerfile in a separate entry because Dependabot doesn't
# support wildcards or recursively checking subdirectories. Check this issue for updates:
# https://github.com/dependabot/dependabot-core/issues/2178
- package-ecosystem: "docker"
directory: "{{cookiecutter.project_slug}}/compose/local/django/"
directories:
- "{{cookiecutter.project_slug}}/compose/local/django/"
- "{{cookiecutter.project_slug}}/compose/local/docs/"
- "{{cookiecutter.project_slug}}/compose/production/django/"
schedule:
interval: "daily"
ignore:
@ -52,59 +45,12 @@ updates:
- "update"
- package-ecosystem: "docker"
directory: "{{cookiecutter.project_slug}}/compose/local/docs/"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
labels:
- "update"
- package-ecosystem: "docker"
directory: "{{cookiecutter.project_slug}}/compose/local/node/"
schedule:
interval: "daily"
labels:
- "update"
- package-ecosystem: "docker"
directory: "{{cookiecutter.project_slug}}/compose/production/aws/"
schedule:
interval: "daily"
labels:
- "update"
- package-ecosystem: "docker"
directory: "{{cookiecutter.project_slug}}/compose/production/django/"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
labels:
- "update"
- package-ecosystem: "docker"
directory: "{{cookiecutter.project_slug}}/compose/production/postgres/"
schedule:
interval: "daily"
labels:
- "update"
- package-ecosystem: "docker"
directory: "{{cookiecutter.project_slug}}/compose/production/nginx/"
schedule:
interval: "daily"
labels:
- "update"
- package-ecosystem: "docker"
directory: "{{cookiecutter.project_slug}}/compose/production/traefik/"
directories:
- "{{cookiecutter.project_slug}}/compose/local/node/"
- "{{cookiecutter.project_slug}}/compose/production/aws/"
- "{{cookiecutter.project_slug}}/compose/production/postgres/"
- "{{cookiecutter.project_slug}}/compose/production/nginx/"
- "{{cookiecutter.project_slug}}/compose/production/traefik/"
schedule:
interval: "daily"
labels:

52
.github/workflows/align-versions.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: align versions
on:
pull_request:
paths:
- "{{cookiecutter.project_slug}}/requirements/local.txt"
- "{{cookiecutter.project_slug}}/compose/local/node/Dockerfile"
# Manual trigger
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
run:
if: ${{ github.actor == 'pyup-bot' }}
runs-on: ubuntu-latest
env:
GH_PAT: ${{ secrets.GH_PAT }}
strategy:
fail-fast: false
matrix:
job:
- script: scripts/ruff_version.py
name: Ruff
- script: scripts/node_version.py
name: Node
name: "${{ matrix.job.name }} versions"
steps:
- name: Checkout with token
uses: actions/checkout@v4
if: ${{ env.GH_PAT != '' }}
with:
token: ${{ env.GH_PAT }}
ref: ${{ github.head_ref }}
- name: Checkout without token
uses: actions/checkout@v4
if: ${{ env.GH_PAT == '' }}
with:
ref: ${{ github.head_ref }}
- uses: astral-sh/setup-uv@v5
- run: uv run ${{ matrix.job.script }}
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Align versions

View File

@ -23,14 +23,12 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: pip install -r requirements.txt
run: uv sync
- name: Run tests
run: pytest -n auto tests
run: uv run pytest -n auto tests
docker:
strategy:
@ -54,12 +52,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: pip install -r requirements.txt
run: uv sync
- name: Docker ${{ matrix.script.name }}
run: sh tests/test_docker.sh ${{ matrix.script.args }}
@ -85,14 +81,14 @@ jobs:
ports:
- 6379:6379
postgres:
image: postgres:12
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
env:
CELERY_BROKER_URL: "redis://localhost:6379/0"
REDIS_URL: "redis://localhost:6379/0"
# postgres://user:password@host:port/database
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"
@ -101,15 +97,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
requirements.txt
{{cookiecutter.project_slug}}/requirements/base.txt
{{cookiecutter.project_slug}}/requirements/local.txt
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: pip install -r requirements.txt
run: uv sync
- uses: actions/setup-node@v4
with:
node-version: "22"
node-version: "22.14"
- name: Bare Metal ${{ matrix.script.name }}
run: sh tests/test_bare.sh ${{ matrix.script.args }}

View File

@ -0,0 +1,33 @@
name: uv
on:
pull_request:
paths:
- "pyproject.toml"
permissions:
contents: write
pull-requests: write
jobs:
lock:
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
env:
GH_PAT: ${{ secrets.GH_PAT }}
steps:
- name: Checkout with token
uses: actions/checkout@v4
if: ${{ env.GH_PAT != '' }}
with:
token: ${{ env.GH_PAT }}
- name: Checkout without token
uses: actions/checkout@v4
if: ${{ env.GH_PAT == '' }}
- uses: astral-sh/setup-uv@v5
- run: uv lock
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Regenerate uv.lock

View File

@ -17,14 +17,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Create Django Major Issue
run: python scripts/create_django_issue.py
run: uv run --frozen scripts/create_django_issue.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -15,20 +15,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set git details
run: |
git config --global user.name "github-actions"
git config --global user.email "action@github.com"
- name: Update list
run: python scripts/update_changelog.py
- name: Update changelog
run: uv run --frozen scripts/update_changelog.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -18,17 +18,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Update list
run: python scripts/update_contributors.py
run: uv run --frozen scripts/update_contributors.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,12 +1,13 @@
exclude: "{{cookiecutter.project_slug}}|.github/contributors.json|CHANGELOG.md|CONTRIBUTORS.md"
default_stages: [commit]
default_stages: [pre-commit]
minimum_pre_commit_version: "3.2.0"
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@ -26,29 +27,29 @@ repos:
args: ["--tab-width", "2"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py312-plus]
exclude: hooks/
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 6.0.1
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
rev: 7.2.0
hooks:
- id: flake8
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.2.4"
rev: "v2.5.1"
hooks:
- id: pyproject-fmt

View File

@ -9,12 +9,13 @@ build:
os: ubuntu-22.04
tools:
python: "3.12"
commands:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv sync --only-group docs --frozen
- uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
# Declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt

View File

@ -3,6 +3,980 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
<!-- GENERATOR_PLACEHOLDER -->
## 2025.04.03
### Updated
- Update django-anymail to 13.0 ([#5763](https://github.com/cookiecutter/cookiecutter-django/pull/5763))
- Update pytest-django to 4.11.1 ([#5762](https://github.com/cookiecutter/cookiecutter-django/pull/5762))
- Update ruff to 0.11.3 ([#5761](https://github.com/cookiecutter/cookiecutter-django/pull/5761))
- Update django-allauth to 65.7.0 ([#5760](https://github.com/cookiecutter/cookiecutter-django/pull/5760))
## 2025.04.02
### Fixed
- Fix line endings for dotenv merge script on Windows ([#5754](https://github.com/cookiecutter/cookiecutter-django/pull/5754))
### Updated
- Update crispy-bootstrap5 to 2025.4 ([#5756](https://github.com/cookiecutter/cookiecutter-django/pull/5756))
- Update Django from 5.0 to 5.1 ([#5740](https://github.com/cookiecutter/cookiecutter-django/pull/5740))
- Update sentry-sdk to 2.25.1 ([#5757](https://github.com/cookiecutter/cookiecutter-django/pull/5757))
- Update django-storages to 1.14.6 ([#5753](https://github.com/cookiecutter/cookiecutter-django/pull/5753))
- Update pytest-django to 4.11.0 ([#5752](https://github.com/cookiecutter/cookiecutter-django/pull/5752))
## 2025.04.01
### Updated
- Update pillow to 11.2.0 ([#5751](https://github.com/cookiecutter/cookiecutter-django/pull/5751))
- Bump traefik from 3.3.4 to 3.3.5 ([#5750](https://github.com/cookiecutter/cookiecutter-django/pull/5750))
- Update celery to 5.5.0 ([#5748](https://github.com/cookiecutter/cookiecutter-django/pull/5748))
## 2025.03.31
### Updated
- Update django-allauth to 65.6.0 ([#5741](https://github.com/cookiecutter/cookiecutter-django/pull/5741))
- Update sentry-sdk to 2.25.0 ([#5747](https://github.com/cookiecutter/cookiecutter-django/pull/5747))
- Update coverage to 7.8.0 ([#5745](https://github.com/cookiecutter/cookiecutter-django/pull/5745))
## 2025.03.28
### Updated
- Update djangorestframework to 3.16.0 ([#5743](https://github.com/cookiecutter/cookiecutter-django/pull/5743))
- Update django-upgrade pre-commit hook to v1.24.0 ([#5742](https://github.com/cookiecutter/cookiecutter-django/pull/5742))
## 2025.03.24
### Updated
- Update django-allauth to 65.5.0 ([#5723](https://github.com/cookiecutter/cookiecutter-django/pull/5723))
- Update sentry-sdk to 2.24.1 ([#5739](https://github.com/cookiecutter/cookiecutter-django/pull/5739))
## 2025.03.22
### Updated
- Update coverage to 7.7.1 ([#5736](https://github.com/cookiecutter/cookiecutter-django/pull/5736))
## 2025.03.21
### Updated
- Update sentry-sdk to 2.24.0 ([#5734](https://github.com/cookiecutter/cookiecutter-django/pull/5734))
- Update django-debug-toolbar to 5.1.0 ([#5732](https://github.com/cookiecutter/cookiecutter-django/pull/5732))
- Update ruff to 0.11.2 ([#5735](https://github.com/cookiecutter/cookiecutter-django/pull/5735))
- Bump amazon/aws-cli from 2.24.0 to 2.25.0 ([#5733](https://github.com/cookiecutter/cookiecutter-django/pull/5733))
- Auto-update pre-commit hooks ([#5657](https://github.com/cookiecutter/cookiecutter-django/pull/5657))
## 2025.03.19
### Updated
- Update pre-commit to 4.2.0 ([#5730](https://github.com/cookiecutter/cookiecutter-django/pull/5730))
## 2025.03.17
### Updated
- Update sentry-sdk to 2.23.1 ([#5727](https://github.com/cookiecutter/cookiecutter-django/pull/5727))
- Update coverage to 7.7.0 ([#5725](https://github.com/cookiecutter/cookiecutter-django/pull/5725))
## 2025.03.15
### Updated
- Update psycopg to 3.2.6 ([#5721](https://github.com/cookiecutter/cookiecutter-django/pull/5721))
- Update ruff to 0.11.0 ([#5724](https://github.com/cookiecutter/cookiecutter-django/pull/5724))
## 2025.03.08
### Updated
- Update ruff to 0.9.10 ([#5720](https://github.com/cookiecutter/cookiecutter-django/pull/5720))
## 2025.03.06
### Updated
- Update django to 5.0.13 ([#5719](https://github.com/cookiecutter/cookiecutter-django/pull/5719))
## 2025.03.04
### Changed
- Add groups for dependabot updates ([#5709](https://github.com/cookiecutter/cookiecutter-django/pull/5709))
### Updated
- Update sphinx to 8.3.0 ([#5714](https://github.com/cookiecutter/cookiecutter-django/pull/5714))
- Update pytest to 8.3.5 ([#5713](https://github.com/cookiecutter/cookiecutter-django/pull/5713))
## 2025.03.01
### Updated
- Update ruff to 0.9.9 ([#5711](https://github.com/cookiecutter/cookiecutter-django/pull/5711))
## 2025.02.28
### Updated
- Update ruff to 0.9.8 ([#5708](https://github.com/cookiecutter/cookiecutter-django/pull/5708))
- Bump babel-loader from 9.2.1 to 10.0.0 ([#5710](https://github.com/cookiecutter/cookiecutter-django/pull/5710))
## 2025.02.26
### Updated
- Bump traefik from 3.3.3 to 3.3.4 ([#5705](https://github.com/cookiecutter/cookiecutter-django/pull/5705))
## 2025.02.25
### Documentation
- Fix links to FAQ about `contrib.sites` directory ([#5704](https://github.com/cookiecutter/cookiecutter-django/pull/5704))
## 2025.02.23
### Changed
- Group dependabot docker directories ([#5698](https://github.com/cookiecutter/cookiecutter-django/pull/5698))
### Updated
- Update sphinx to 8.2.1 ([#5696](https://github.com/cookiecutter/cookiecutter-django/pull/5696))
- Update psycopg to 3.2.5 ([#5697](https://github.com/cookiecutter/cookiecutter-django/pull/5697))
## 2025.02.21
### Updated
- Update djangorestframework-stubs to 3.15.3 ([#5695](https://github.com/cookiecutter/cookiecutter-django/pull/5695))
- Update sphinx to 8.2.0 ([#5693](https://github.com/cookiecutter/cookiecutter-django/pull/5693))
- Update ruff to 0.9.7 ([#5694](https://github.com/cookiecutter/cookiecutter-django/pull/5694))
## 2025.02.17
### Updated
- Update sentry-sdk to 2.22.0 ([#5692](https://github.com/cookiecutter/cookiecutter-django/pull/5692))
- Update django-storages to 1.14.5 ([#5690](https://github.com/cookiecutter/cookiecutter-django/pull/5690))
## 2025.02.14
### Updated
- Bump node from 22.13 to 22.14 ([#5688](https://github.com/cookiecutter/cookiecutter-django/pull/5688))
## 2025.02.13
### Updated
- Update sentry-sdk to 2.21.0 ([#5687](https://github.com/cookiecutter/cookiecutter-django/pull/5687))
## 2025.02.11
### Updated
- Update coverage to 7.6.12 ([#5686](https://github.com/cookiecutter/cookiecutter-django/pull/5686))
## 2025.02.10
### Updated
- Update pytest-django to 4.10.0 ([#5684](https://github.com/cookiecutter/cookiecutter-django/pull/5684))
- Update ruff to 0.9.6 ([#5683](https://github.com/cookiecutter/cookiecutter-django/pull/5683))
- Bump amazon/aws-cli from 2.23.0 to 2.24.0 ([#5682](https://github.com/cookiecutter/cookiecutter-django/pull/5682))
## 2025.02.08
### Updated
- Update coverage to 7.6.11 ([#5681](https://github.com/cookiecutter/cookiecutter-django/pull/5681))
## 2025.02.07
### Updated
- Update mypy to 1.15.0 ([#5664](https://github.com/cookiecutter/cookiecutter-django/pull/5664))
- Update django-stubs to 5.1.3 ([#5680](https://github.com/cookiecutter/cookiecutter-django/pull/5680))
- Bump python from 3.12.8 to 3.12.9 in local Docker image ([#5678](https://github.com/cookiecutter/cookiecutter-django/pull/5678))
- Bump python from 3.12.8 to 3.12.9 in production Docker image ([#5677](https://github.com/cookiecutter/cookiecutter-django/pull/5677))
- Bump python from 3.12.8 to 3.12.9 in docs Docker image ([#5676](https://github.com/cookiecutter/cookiecutter-django/pull/5676))
- Update django-allauth to 65.4.1 ([#5679](https://github.com/cookiecutter/cookiecutter-django/pull/5679))
- Update django-cors-headers to 4.7.0 ([#5675](https://github.com/cookiecutter/cookiecutter-django/pull/5675))
- Update whitenoise to 6.9.0 ([#5674](https://github.com/cookiecutter/cookiecutter-django/pull/5674))
## 2025.02.06
### Fixed
- Bump node version in production Dockerfile from 20 to 22.13 ([#5672](https://github.com/cookiecutter/cookiecutter-django/pull/5672))
### Updated
- Update ruff to 0.9.5 ([#5673](https://github.com/cookiecutter/cookiecutter-django/pull/5673))
## 2025.02.05
### Changed
- Add missing trailing slash in test `MEDIA_URL` ([#5666](https://github.com/cookiecutter/cookiecutter-django/pull/5666))
### Updated
- Update django to 5.0.12 ([#5667](https://github.com/cookiecutter/cookiecutter-django/pull/5667))
## 2025.02.03
### Updated
- Bump traefik from 3.3.2 to 3.3.3 ([#5660](https://github.com/cookiecutter/cookiecutter-django/pull/5660))
- Update factory-boy to 3.3.2 ([#5661](https://github.com/cookiecutter/cookiecutter-django/pull/5661))
## 2025.01.30
### Updated
- Update ruff to 0.9.4 ([#5659](https://github.com/cookiecutter/cookiecutter-django/pull/5659))
## 2025.01.26
### Changed
- Migrate generated project from `runtime.txt` to `.python-version` ([#5652](https://github.com/cookiecutter/cookiecutter-django/pull/5652))
### Documentation
- Update Heroku deployment guide ([#5656](https://github.com/cookiecutter/cookiecutter-django/pull/5656))
## 2025.01.24
### Updated
- Update ruff to 0.9.3 ([#5654](https://github.com/cookiecutter/cookiecutter-django/pull/5654))
## 2025.01.21
### Changed
- Update linter error code from TCH to TC ([#5651](https://github.com/cookiecutter/cookiecutter-django/pull/5651))
### Updated
- Update pre-commit to 4.1.0 ([#5650](https://github.com/cookiecutter/cookiecutter-django/pull/5650))
## 2025.01.20
### Changed
- Group all API tests under a `tests.api` namespace ([#5615](https://github.com/cookiecutter/cookiecutter-django/pull/5615))
- Migrate post-generation hook to pathlib ([#5648](https://github.com/cookiecutter/cookiecutter-django/pull/5648))
## 2025.01.16
### Updated
- Update ruff to 0.9.2 ([#5646](https://github.com/cookiecutter/cookiecutter-django/pull/5646))
- Bump amazon/aws-cli from 2.22.1 to 2.23.0 ([#5645](https://github.com/cookiecutter/cookiecutter-django/pull/5645))
## 2025.01.15
### Fixed
- Fix setting for to `CELERY_WORKER_HIJACK_ROOT_LOGGER` ([#5643](https://github.com/cookiecutter/cookiecutter-django/pull/5643))
### Updated
- Update psycopg to 3.2.4 ([#5644](https://github.com/cookiecutter/cookiecutter-django/pull/5644))
- Update django-stubs to 5.1.2 ([#5639](https://github.com/cookiecutter/cookiecutter-django/pull/5639))
- Bump traefik from 3.3.1 to 3.3.2 ([#5642](https://github.com/cookiecutter/cookiecutter-django/pull/5642))
## 2025.01.14
### Updated
- Update django to 5.0.11 ([#5640](https://github.com/cookiecutter/cookiecutter-django/pull/5640))
- Update sentry-sdk to 2.20.0 ([#5638](https://github.com/cookiecutter/cookiecutter-django/pull/5638))
- Update django-debug-toolbar to 5.0.1 ([#5636](https://github.com/cookiecutter/cookiecutter-django/pull/5636))
## 2025.01.13
### Updated
- Update django-environ to 0.12.0 ([#5635](https://github.com/cookiecutter/cookiecutter-django/pull/5635))
- Bump traefik from 3.3.0 to 3.3.1 ([#5634](https://github.com/cookiecutter/cookiecutter-django/pull/5634))
## 2025.01.11
### Updated
- Update ruff to 0.9.1 ([#5633](https://github.com/cookiecutter/cookiecutter-django/pull/5633))
## 2025.01.10
### Updated
- Update watchfiles to 1.0.4 ([#5631](https://github.com/cookiecutter/cookiecutter-django/pull/5631))
## 2025.01.09
### Changed
- Drop support for Python 2 in template generation hooks ([#5614](https://github.com/cookiecutter/cookiecutter-django/pull/5614))
### Updated
- Bump node from 22.12 to 22.13 ([#5627](https://github.com/cookiecutter/cookiecutter-django/pull/5627))
## 2025.01.07
### Fixed
- Set `minimum_pre_commit_version` in pre-commit config ([#5626](https://github.com/cookiecutter/cookiecutter-django/pull/5626))
### Updated
- Bump traefik from 3.2.3 to 3.3.0 ([#5625](https://github.com/cookiecutter/cookiecutter-django/pull/5625))
## 2025.01.06
### Changed
- Add justfile for use with docker ([#5621](https://github.com/cookiecutter/cookiecutter-django/pull/5621))
## 2025.01.04
### Updated
- Update ruff to 0.8.6 ([#5622](https://github.com/cookiecutter/cookiecutter-django/pull/5622))
## 2025.01.02
### Fixed
- Fix logging configuration for Celery tasks ([#5563](https://github.com/cookiecutter/cookiecutter-django/pull/5563))
### Updated
- Update ruff to 0.8.5 ([#5619](https://github.com/cookiecutter/cookiecutter-django/pull/5619))
- Update pillow to 11.1.0 ([#5617](https://github.com/cookiecutter/cookiecutter-django/pull/5617))
## 2024.12.27
### Updated
- Update coverage to 7.6.10 ([#5608](https://github.com/cookiecutter/cookiecutter-django/pull/5608))
- Update uvicorn-worker to 0.3.0 ([#5607](https://github.com/cookiecutter/cookiecutter-django/pull/5607))
## 2024.12.26
### Updated
- Update collectfasta to 3.2.1 ([#5606](https://github.com/cookiecutter/cookiecutter-django/pull/5606))
- Update django-allauth to 65.3.1 ([#5605](https://github.com/cookiecutter/cookiecutter-django/pull/5605))
## 2024.12.24
### Updated
- Update djlint to 1.36.4 ([#5603](https://github.com/cookiecutter/cookiecutter-django/pull/5603))
- Update uvicorn to 0.34.0 ([#5592](https://github.com/cookiecutter/cookiecutter-django/pull/5592))
## 2024.12.23
### Updated
- Bump webpack-cli from 5.1.4 to 6.0.1 ([#5601](https://github.com/cookiecutter/cookiecutter-django/pull/5601))
## 2024.12.20
### Updated
- Update ruff to 0.8.4 ([#5595](https://github.com/cookiecutter/cookiecutter-django/pull/5595))
## 2024.12.17
### Updated
- Update djangorestframework-stubs to 3.15.2 ([#5591](https://github.com/cookiecutter/cookiecutter-django/pull/5591))
- Bump traefik from 3.2.2 to 3.2.3 ([#5594](https://github.com/cookiecutter/cookiecutter-django/pull/5594))
## 2024.12.12
### Updated
- Update ruff to 0.8.3 ([#5587](https://github.com/cookiecutter/cookiecutter-django/pull/5587))
## 2024.12.11
### Updated
- Bump traefik from 3.2.1 to 3.2.2 ([#5586](https://github.com/cookiecutter/cookiecutter-django/pull/5586))
## 2024.12.10
### Updated
- Update watchfiles to 1.0.3 ([#5585](https://github.com/cookiecutter/cookiecutter-django/pull/5585))
- Bump node from 22.11 to 22.12 ([#5583](https://github.com/cookiecutter/cookiecutter-django/pull/5583))
## 2024.12.08
### Fixed
- Pin node to version 22.11 ([#5582](https://github.com/cookiecutter/cookiecutter-django/pull/5582))
### Updated
- Update ruff to 0.8.2 ([#5576](https://github.com/cookiecutter/cookiecutter-django/pull/5576))
- Update coverage to 7.6.9 ([#5581](https://github.com/cookiecutter/cookiecutter-django/pull/5581))
- Update sentry-sdk to 2.19.2 ([#5579](https://github.com/cookiecutter/cookiecutter-django/pull/5579))
- Bump python from 3.12.7 to 3.12.8 in production Docker image ([#5575](https://github.com/cookiecutter/cookiecutter-django/pull/5575))
- Bump python from 3.12.7 to 3.12.8 in local Docker image ([#5574](https://github.com/cookiecutter/cookiecutter-django/pull/5574))
- Bump python from 3.12.7 to 3.12.8 in docs Docker image ([#5573](https://github.com/cookiecutter/cookiecutter-django/pull/5573))
- Update hiredis to 3.1.0 ([#5571](https://github.com/cookiecutter/cookiecutter-django/pull/5571))
- Update redis to 5.2.1 ([#5580](https://github.com/cookiecutter/cookiecutter-django/pull/5580))
- Update django to 5.0.10 ([#5572](https://github.com/cookiecutter/cookiecutter-django/pull/5572))
- Update drf-spectacular to 0.28.0 ([#5564](https://github.com/cookiecutter/cookiecutter-django/pull/5564))
## 2024.12.03
### Updated
- Update django-upgrade to 1.22.2 ([#5567](https://github.com/cookiecutter/cookiecutter-django/pull/5567))
## 2024.12.02
### Updated
- Update pytest to 8.3.4 ([#5566](https://github.com/cookiecutter/cookiecutter-django/pull/5566))
## 2024.12.01
### Updated
- Update django-allauth to 65.3.0 ([#5565](https://github.com/cookiecutter/cookiecutter-django/pull/5565))
## 2024.11.29
### Updated
- Update ruff to 0.8.1 ([#5557](https://github.com/cookiecutter/cookiecutter-django/pull/5557))
- Update djlint to 1.36.3 ([#5558](https://github.com/cookiecutter/cookiecutter-django/pull/5558))
## 2024.11.28
### Updated
- Update djlint to 1.36.2 ([#5555](https://github.com/cookiecutter/cookiecutter-django/pull/5555))
## 2024.11.27
### Fixed
- Pin dart-sass to 1.77.6 to avoid deprecation warnings ([#5552](https://github.com/cookiecutter/cookiecutter-django/pull/5552))
### Updated
- Bump gulp-imagemin from 7.1.0 to 9.1.0 ([#5052](https://github.com/cookiecutter/cookiecutter-django/pull/5052))
- Bump gulp from 4.0.2 to 5.0.0 ([#4949](https://github.com/cookiecutter/cookiecutter-django/pull/4949))
## 2024.11.26
### Updated
- Update coverage to 7.6.8 ([#5547](https://github.com/cookiecutter/cookiecutter-django/pull/5547))
- Update watchfiles to 1.0.0 ([#5548](https://github.com/cookiecutter/cookiecutter-django/pull/5548))
## 2024.11.22
### Updated
- Update ruff to 0.8.0 ([#5545](https://github.com/cookiecutter/cookiecutter-django/pull/5545))
## 2024.11.21
### Changed
- Add support for secure Redis (TLS support) ([#5526](https://github.com/cookiecutter/cookiecutter-django/pull/5526))
### Updated
- Update sentry-sdk to 2.19.0 ([#5543](https://github.com/cookiecutter/cookiecutter-django/pull/5543))
- Update uvicorn to 0.32.1 ([#5539](https://github.com/cookiecutter/cookiecutter-django/pull/5539))
- Bump traefik from 3.2.0 to 3.2.1 ([#5541](https://github.com/cookiecutter/cookiecutter-django/pull/5541))
## 2024.11.20
### Fixed
- Fix typos in translation instructions in README ([#5538](https://github.com/cookiecutter/cookiecutter-django/pull/5538))
### Updated
- Bump amazon/aws-cli from 2.21.0 to 2.22.1 ([#5537](https://github.com/cookiecutter/cookiecutter-django/pull/5537))
## 2024.11.16
### Updated
- Update ruff to 0.7.4 ([#5531](https://github.com/cookiecutter/cookiecutter-django/pull/5531))
## 2024.11.15
### Updated
- Update coverage to 7.6.5 ([#5529](https://github.com/cookiecutter/cookiecutter-django/pull/5529))
## 2024.11.14
### Updated
- Bump amazon/aws-cli from 2.20.0 to 2.21.0 ([#5528](https://github.com/cookiecutter/cookiecutter-django/pull/5528))
## 2024.11.13
### Updated
- Update werkzeug to 3.1.3 ([#5524](https://github.com/cookiecutter/cookiecutter-django/pull/5524))
- Update ruff to 0.7.3 ([#5521](https://github.com/cookiecutter/cookiecutter-django/pull/5521))
- Bump amazon/aws-cli from 2.19.0 to 2.20.0 ([#5527](https://github.com/cookiecutter/cookiecutter-django/pull/5527))
- Update django-allauth to 65.2.0 ([#5523](https://github.com/cookiecutter/cookiecutter-django/pull/5523))
## 2024.11.08
### Updated
- Update ruff pre-commit hook to 0.7.3 ([#5522](https://github.com/cookiecutter/cookiecutter-django/pull/5522))
## 2024.11.07
### Updated
- Update djlint to 1.36.1 ([#5519](https://github.com/cookiecutter/cookiecutter-django/pull/5519))
## 2024.11.05
### Updated
- Update djlint to 1.36.0 ([#5517](https://github.com/cookiecutter/cookiecutter-django/pull/5517))
## 2024.11.04
### Updated
- Update sentry-sdk to 2.18.0 ([#5515](https://github.com/cookiecutter/cookiecutter-django/pull/5515))
## 2024.11.02
### Updated
- Update ruff to 0.7.2 ([#5510](https://github.com/cookiecutter/cookiecutter-django/pull/5510))
## 2024.11.01
### Updated
- Update djlint to 1.35.4 ([#5508](https://github.com/cookiecutter/cookiecutter-django/pull/5508))
- Bump amazon/aws-cli from 2.18.1 to 2.19.0 ([#5507](https://github.com/cookiecutter/cookiecutter-django/pull/5507))
## 2024.10.30
### Documentation
- Small spelling correction in comment ([#5502](https://github.com/cookiecutter/cookiecutter-django/pull/5502))
### Updated
- Update djlint to 1.35.3 ([#5503](https://github.com/cookiecutter/cookiecutter-django/pull/5503))
- Update whitenoise to 6.8.2 ([#5501](https://github.com/cookiecutter/cookiecutter-django/pull/5501))
## 2024.10.29
### Updated
- Update django-cors-headers to 4.6.0 ([#5499](https://github.com/cookiecutter/cookiecutter-django/pull/5499))
- Update whitenoise to 6.8.1 ([#5497](https://github.com/cookiecutter/cookiecutter-django/pull/5497))
- Bump traefik from 3.1.6 to 3.2.0 ([#5498](https://github.com/cookiecutter/cookiecutter-django/pull/5498))
## 2024.10.26
### Updated
- Update django-stubs to 5.1.1 ([#5495](https://github.com/cookiecutter/cookiecutter-django/pull/5495))
- Update mypy to 1.13.0 ([#5484](https://github.com/cookiecutter/cookiecutter-django/pull/5484))
- Update werkzeug to 3.0.6 ([#5492](https://github.com/cookiecutter/cookiecutter-django/pull/5492))
## 2024.10.25
### Updated
- Update werkzeug to 3.0.5 and unpin watchdog&lt;5 ([#5489](https://github.com/cookiecutter/cookiecutter-django/pull/5489))
## 2024.10.24
### Updated
- Update ruff to 0.7.1 ([#5487](https://github.com/cookiecutter/cookiecutter-django/pull/5487))
- Update redis to 5.2.0 ([#5486](https://github.com/cookiecutter/cookiecutter-django/pull/5486))
- Update django-allauth to 65.1.0 ([#5485](https://github.com/cookiecutter/cookiecutter-django/pull/5485))
## 2024.10.22
### Changed
- Fix broken links in generated README ([#5482](https://github.com/cookiecutter/cookiecutter-django/pull/5482))
### Updated
- Auto-update pre-commit hooks ([#5483](https://github.com/cookiecutter/cookiecutter-django/pull/5483))
## 2024.10.21
### Changed
- Remove CELERY_BROKER_URL in favor of REDIS_URL ([#4861](https://github.com/cookiecutter/cookiecutter-django/pull/4861))
### Fixed
- Fix a number of issues with Azure storage ([#5476](https://github.com/cookiecutter/cookiecutter-django/pull/5476))
### Updated
- Update coverage to 7.6.4 ([#5480](https://github.com/cookiecutter/cookiecutter-django/pull/5480))
## 2024.10.17
### Updated
- Update ruff to 0.7.0 ([#5474](https://github.com/cookiecutter/cookiecutter-django/pull/5474))
- Update uvicorn to 0.32.0 ([#5471](https://github.com/cookiecutter/cookiecutter-django/pull/5471))
- Update pillow to 11.0.0 ([#5470](https://github.com/cookiecutter/cookiecutter-django/pull/5470))
- Update sentry-sdk to 2.17.0 ([#5473](https://github.com/cookiecutter/cookiecutter-django/pull/5473))
## 2024.10.15
### Changed
- [pre-commit.ci] pre-commit autoupdate ([#5468](https://github.com/cookiecutter/cookiecutter-django/pull/5468))
## 2024.10.14
### Changed
- Add requirements for ubuntu 24.04 ([#5467](https://github.com/cookiecutter/cookiecutter-django/pull/5467))
### Updated
- Update sphinx to 8.1.3 ([#5463](https://github.com/cookiecutter/cookiecutter-django/pull/5463))
- Update coverage to 7.6.3 ([#5464](https://github.com/cookiecutter/cookiecutter-django/pull/5464))
## 2024.10.12
### Changed
- Pin Python version to 3.12 ([#5456](https://github.com/cookiecutter/cookiecutter-django/pull/5456))
### Updated
- Update sphinx to 8.1.1 ([#5457](https://github.com/cookiecutter/cookiecutter-django/pull/5457))
- Auto-update pre-commit hooks ([#5458](https://github.com/cookiecutter/cookiecutter-django/pull/5458))
- Update django-cors-headers to 4.5.0 ([#5459](https://github.com/cookiecutter/cookiecutter-django/pull/5459))
## 2024.10.11
### Changed
- Update README.md broken links ([#5454](https://github.com/cookiecutter/cookiecutter-django/pull/5454))
- wait-for-it as dependency in the run stage ([#5452](https://github.com/cookiecutter/cookiecutter-django/pull/5452))
### Updated
- Auto-update pre-commit hooks ([#5450](https://github.com/cookiecutter/cookiecutter-django/pull/5450))
## 2024.10.10
### Updated
- Update sentry-sdk to 2.16.0 ([#5444](https://github.com/cookiecutter/cookiecutter-django/pull/5444))
- Bump traefik from 3.1.5 to 3.1.6 ([#5449](https://github.com/cookiecutter/cookiecutter-django/pull/5449))
## 2024.10.09
### Updated
- Update coverage to 7.6.2 ([#5448](https://github.com/cookiecutter/cookiecutter-django/pull/5448))
## 2024.10.08
### Changed
- [pre-commit.ci] pre-commit autoupdate ([#5441](https://github.com/cookiecutter/cookiecutter-django/pull/5441))
### Updated
- Update pre-commit to 4.0.1 ([#5445](https://github.com/cookiecutter/cookiecutter-django/pull/5445))
- Bump amazon/aws-cli from 2.18.0 to 2.18.1 in /{{cookiecutter.project_slug}}/compose/production/aws ([#5443](https://github.com/cookiecutter/cookiecutter-django/pull/5443))
- Auto-update pre-commit hooks ([#5442](https://github.com/cookiecutter/cookiecutter-django/pull/5442))
## 2024.10.07
### Documentation
- Docs: fix Mailgun include in troubleshooting sections ([#5439](https://github.com/cookiecutter/cookiecutter-django/pull/5439))
### Updated
- Update sphinx to 8.0.2 ([#5263](https://github.com/cookiecutter/cookiecutter-django/pull/5263))
- Update pre-commit to 4.0.0 ([#5432](https://github.com/cookiecutter/cookiecutter-django/pull/5432))
- Auto-update pre-commit hooks ([#5433](https://github.com/cookiecutter/cookiecutter-django/pull/5433))
- Update sphinx-rtd-theme to 3.0.0 ([#5437](https://github.com/cookiecutter/cookiecutter-django/pull/5437))
- Bump amazon/aws-cli from 2.17.0 to 2.18.0 in /{{cookiecutter.project_slug}}/compose/production/aws ([#5436](https://github.com/cookiecutter/cookiecutter-django/pull/5436))
## 2024.10.05
### Changed
- Replace pip with uv for the project files ([#5356](https://github.com/cookiecutter/cookiecutter-django/pull/5356))
- Use wait-for-it in favor of the custom python script when waiting for postgres ([#5327](https://github.com/cookiecutter/cookiecutter-django/pull/5327))
### Documentation
- Spit docs into sections ([#5426](https://github.com/cookiecutter/cookiecutter-django/pull/5426))
### Updated
- Update crispy-bootstrap5 to 2024.10 ([#5430](https://github.com/cookiecutter/cookiecutter-django/pull/5430))
## 2024.10.04
### Updated
- Update ruff to 0.6.9 ([#5428](https://github.com/cookiecutter/cookiecutter-django/pull/5428))
- Update redis to 5.1.1 ([#5427](https://github.com/cookiecutter/cookiecutter-django/pull/5427))
## 2024.10.03
### Updated
- Update sphinx-autobuild to 2024.10.3 ([#5420](https://github.com/cookiecutter/cookiecutter-django/pull/5420))
- Bump traefik from 3.1.4 to 3.1.5 ([#5423](https://github.com/cookiecutter/cookiecutter-django/pull/5423))
## 2024.10.02
### Updated
- Bump python from 3.12.6 to 3.12.7 in docs Docker image ([#5416](https://github.com/cookiecutter/cookiecutter-django/pull/5416))
- Bump python from 3.12.6 to 3.12.7 in local Docker image ([#5415](https://github.com/cookiecutter/cookiecutter-django/pull/5415))
- Bump python from 3.12.6 to 3.12.7 production Docker ([#5414](https://github.com/cookiecutter/cookiecutter-django/pull/5414))
## 2024.10.01
### Updated
- Update sentry-sdk to 2.15.0 ([#5413](https://github.com/cookiecutter/cookiecutter-django/pull/5413))
## 2024.09.29
### Updated
- Update psycopg to 3.2.3 ([#5411](https://github.com/cookiecutter/cookiecutter-django/pull/5411))
## 2024.09.28

View File

@ -24,33 +24,20 @@ We'll also run the tests on GitHub actions when you send your pull request, but
### Installation
First, make sure that your version of Python is 3.12:
```bash
$ python --version
Python 3.12.2
```
Any version that starts with 3.12 will do. If you need to install it, you can get it from [python.org](https://www.python.org/downloads/).
Then install `tox`, if not already installed:
```bash
$ python -m pip install tox
```
We use uv to manage our environment and manage our Python installation. You can install it following the instructions at https://docs.astral.sh/uv/getting-started/installation/
### Run the template's test suite
To run the tests of the template using the current Python version:
```bash
$ tox -e py
$ uv run tox run -e py
```
This uses `pytest `under the hood, and you can pass options to it after a `--`. So to run a particular test:
```bash
$ tox -e py -- -k test_default_configuration
$ uv run tox run -e py -- -k test_default_configuration
```
For further information, please consult the [pytest usage docs](https://pytest.org/en/latest/how-to/usage.html#specifying-which-tests-to-run).

View File

@ -201,6 +201,20 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Aidos Kanapyanov</td>
<td>
<a href="https://github.com/aidoskanapyanov">aidoskanapyanov</a>
</td>
<td></td>
</tr>
<tr>
<td>Alan Cyment</td>
<td>
<a href="https://github.com/acyment">acyment</a>
</td>
<td></td>
</tr>
<tr>
<td>Alberto Sanchez</td>
<td>
@ -544,6 +558,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Christian Jensen</td>
<td>
<a href="https://github.com/jensenbox">jensenbox</a>
</td>
<td>cjensen</td>
</tr>
<tr>
<td>Christopher Clarke</td>
<td>
@ -726,6 +747,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Denis Darii</td>
<td>
<a href="https://github.com/DNX">DNX</a>
</td>
<td></td>
</tr>
<tr>
<td>Denis Orehovsky</td>
<td>
@ -789,6 +817,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Ed Morley</td>
<td>
<a href="https://github.com/edmorley">edmorley</a>
</td>
<td></td>
</tr>
<tr>
<td>Emanuel Calso</td>
<td>
@ -880,6 +915,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Francisco Navarro Morales </td>
<td>
<a href="https://github.com/spothound">spothound</a>
</td>
<td></td>
</tr>
<tr>
<td>Freddy</td>
<td>
@ -978,6 +1020,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Hana Belay</td>
<td>
<a href="https://github.com/earthcomfy">earthcomfy</a>
</td>
<td></td>
</tr>
<tr>
<td>Hana Quadara</td>
<td>
@ -1062,6 +1111,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Igor Jerosimić</td>
<td>
<a href="https://github.com/igor-wl">igor-wl</a>
</td>
<td></td>
</tr>
<tr>
<td>Imran Rahman</td>
<td>
@ -1279,6 +1335,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Kawsar Alam Foysal</td>
<td>
<a href="https://github.com/iamfoysal">iamfoysal</a>
</td>
<td></td>
</tr>
<tr>
<td>Keith Bailey</td>
<td>
@ -1482,6 +1545,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Mariot Tsitoara</td>
<td>
<a href="https://github.com/mariot">mariot</a>
</td>
<td></td>
</tr>
<tr>
<td>Marlon Castillo</td>
<td>
@ -1818,6 +1888,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Pepa</td>
<td>
<a href="https://github.com/07pepa">07pepa</a>
</td>
<td></td>
</tr>
<tr>
<td>Peter Bittner</td>
<td>
@ -1860,6 +1937,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Pulse-Mind</td>
<td>
<a href="https://github.com/pulse-mind">pulse-mind</a>
</td>
<td></td>
</tr>
<tr>
<td>quroom</td>
<td>
@ -1867,6 +1951,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>qwerrrqw</td>
<td>
<a href="https://github.com/qwerrrqw">qwerrrqw</a>
</td>
<td></td>
</tr>
<tr>
<td>Raony Guimarães Corrêa</td>
<td>

View File

@ -13,13 +13,13 @@ Powered by [Cookiecutter](https://github.com/cookiecutter/cookiecutter), Cookiec
production-ready Django projects quickly.
- Documentation: <https://cookiecutter-django.readthedocs.io/en/latest/>
- See [Troubleshooting](https://cookiecutter-django.readthedocs.io/en/latest/troubleshooting.html) for common errors and obstacles
- See [Troubleshooting](https://cookiecutter-django.readthedocs.io/en/latest/5-help/troubleshooting.html) for common errors and obstacles
- If you have problems with Cookiecutter Django, please open [issues](https://github.com/cookiecutter/cookiecutter-django/issues/new) don't send
emails to the maintainers.
## Features
- For Django 5.0
- For Django 5.1
- Works with Python 3.12
- Renders Django projects with 100% starting test coverage
- Twitter [Bootstrap](https://github.com/twbs/bootstrap) v5
@ -51,7 +51,7 @@ _These features can be enabled during initial project setup._
## Constraints
- Only maintained 3rd party libraries are used.
- Uses PostgreSQL everywhere: 12 - 16 ([MySQL fork](https://github.com/mabdullahadeel/cookiecutter-django-mysql) also available).
- Uses PostgreSQL everywhere: 13 - 16 ([MySQL fork](https://github.com/mabdullahadeel/cookiecutter-django-mysql) also available).
- Environment variables for configuration (This won't work with Apache/mod_wsgi).
## Support this Project!
@ -94,7 +94,7 @@ You'll be prompted for some values. Provide them, then a Django project will be
**Warning**: After this point, change 'Daniel Greenfeld', 'pydanny', etc to your own information.
Answer the prompts with your own desired [options](http://cookiecutter-django.readthedocs.io/en/latest/project-generation-options.html). For example:
Answer the prompts with your own desired [options](http://cookiecutter-django.readthedocs.io/en/latest/1-getting-started/project-generation-options.html). For example:
Cloning into 'cookiecutter-django'...
remote: Counting objects: 550, done.
@ -133,8 +133,7 @@ Answer the prompts with your own desired [options](http://cookiecutter-django.re
2 - 15
3 - 14
4 - 13
5 - 12
Choose from 1, 2, 3, 4, 5 [1]: 1
Choose from 1, 2, 3, 4 [1]: 1
Select cloud_provider:
1 - AWS
2 - GCP
@ -190,8 +189,8 @@ Now take a look at your repo. Don't forget to carefully look at the generated RE
For local development, see the following:
- [Developing locally](http://cookiecutter-django.readthedocs.io/en/latest/developing-locally.html)
- [Developing locally using docker](http://cookiecutter-django.readthedocs.io/en/latest/developing-locally-docker.html)
- [Developing locally](https://cookiecutter-django.readthedocs.io/en/latest/2-local-development/developing-locally.html)
- [Developing locally using docker](https://cookiecutter-django.readthedocs.io/en/latest/2-local-development/developing-locally-docker.html)
## Community

View File

@ -18,7 +18,7 @@
"windows": "n",
"editor": ["None", "PyCharm", "VS Code"],
"use_docker": "n",
"postgresql_version": ["16", "15", "14", "13", "12"],
"postgresql_version": ["16", "15", "14", "13"],
"cloud_provider": ["AWS", "GCP", "Azure", "None"],
"mail_service": [
"Mailgun",

View File

@ -70,7 +70,6 @@ postgresql_version:
2. 15
3. 14
4. 13
5. 12
cloud_provider:
Select a cloud provider for static & media files. The choices are:

View File

@ -39,7 +39,6 @@ The following table lists settings and their defaults for third-party applicatio
======================================= =========================== ============================================== ======================================================================
Environment Variable Django Setting Development Default Production Default
======================================= =========================== ============================================== ======================================================================
CELERY_BROKER_URL CELERY_BROKER_URL auto w/ Docker; raises error w/o raises error
DJANGO_AWS_ACCESS_KEY_ID AWS_ACCESS_KEY_ID n/a raises error
DJANGO_AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY n/a raises error
DJANGO_AWS_STORAGE_BUCKET_NAME AWS_STORAGE_BUCKET_NAME n/a raises error

View File

@ -242,6 +242,41 @@ The stack comes with a dedicated node service to build the static assets, watch
.. _Sass: https://sass-lang.com/
.. _live reloading: https://browsersync.io
Using Just for Docker Commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We have included a ``justfile`` to simplify the use of frequent Docker commands for local development.
.. warning::
Currently, "Just" does not reliably handle signals or forward them to its subprocesses. As a result,
pressing CTRL+C (or sending other signals like SIGTERM, SIGINT, or SIGHUP) may only interrupt
"Just" itself rather than its subprocesses.
For more information, see `this GitHub issue <https://github.com/casey/just/issues/2473>`_.
First, install Just using one of the methods described in the `official documentation <https://just.systems/man/en/packages.html>`_.
Here are the available commands:
- ``just build``
Builds the Python image using the local Docker Compose file.
- ``just up``
Starts the containers in detached mode and removes orphaned containers.
- ``just down``
Stops the running containers.
- ``just prune``
Stops and removes containers along with their volumes. You can optionally pass an argument with the service name to prune a single container.
- ``just logs``
Shows container logs. You can optionally pass an argument with the service name to view logs for a specific service.
- ``just manage <command>``
Runs Django management commands within the container. Replace ``<command>`` with any valid Django management command, such as ``migrate``, ``createsuperuser``, or ``shell``.
(Optionally) Developing locally with HTTPS
------------------------------------------
@ -257,7 +292,7 @@ Here is a link to an article on `how to add HTTPS using Nginx`_ to your local do
Webpack
~~~~~~~
If you are using Webpack, first install ``mkcert``_. It is a simple by design tool that hides all the arcane knowledge required to generate valid TLS certificates. It works for any hostname or IP, including localhost. It supports macOS, Linux, and Windows, and Firefox, Chrome and Java. It even works on mobile devices with a couple manual steps. See https://blog.filippo.io/mkcert-valid-https-certificates-for-localhost/
If you are using Webpack, first install `mkcert`_. It is a simple by design tool that hides all the arcane knowledge required to generate valid TLS certificates. It works for any hostname or IP, including localhost. It supports macOS, Linux, and Windows, and Firefox, Chrome and Java. It even works on mobile devices with a couple manual steps. See https://blog.filippo.io/mkcert-valid-https-certificates-for-localhost/
.. _`mkcert`: https://github.com/FiloSottile/mkcert/blob/master/README.md#supported-root-stores
@ -267,36 +302,36 @@ Assuming that you registered your local hostname as ``my-dev-env.local``, the ce
1. Add the ``nginx-proxy`` service to the ``docker-compose.local.yml``. ::
nginx-proxy:
image: jwilder/nginx-proxy:alpine
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs
restart: always
depends_on:
- node
environment:
- VIRTUAL_HOST=my-dev-env.local
- VIRTUAL_PORT=3000
nginx-proxy:
image: jwilder/nginx-proxy:alpine
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs
restart: always
depends_on:
- node
environment:
- VIRTUAL_HOST=my-dev-env.local
- VIRTUAL_PORT=3000
2. Add the local secure domain to the ``config/settings/local.py``. You should allow the new hostname ::
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "my-dev-env.local"]
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "my-dev-env.local"]
3. Add the following configuration to the ``devServer`` section of ``webpack/dev.config.js`` ::
client: {
webSocketURL: 'auto://0.0.0.0:0/ws', // note the `:0` after `0.0.0.0`
},
client: {
webSocketURL: 'auto://0.0.0.0:0/ws', // note the `:0` after `0.0.0.0`
},
Rebuild your ``docker`` application. ::
$ docker compose -f docker-compose.local.yml up -d --build
$ docker compose -f docker-compose.local.yml up -d --build
Go to your browser and type in your URL bar ``https://my-dev-env.local``.

View File

@ -24,8 +24,7 @@ First things first.
$ source <virtual env path>/bin/activate
#.
.. include:: generate-project-block.rst
#. .. include:: generate-project-block.rst
#. Install development requirements: ::
@ -56,8 +55,6 @@ First things first.
#. Set the environment variables for your database(s): ::
$ export DATABASE_URL=postgres://postgres:<password>@127.0.0.1:5432/<DB name given to createdb>
# Optional: set broker URL if using Celery
$ export CELERY_BROKER_URL=redis://localhost:6379/0
.. note::
@ -219,7 +216,7 @@ The project comes with a simple task for manual testing purposes, inside `<proje
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/
.. _Getting started with Redis: 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/

View File

@ -14,6 +14,7 @@ Run these commands to deploy the project to Heroku:
# Note: this is not a free plan
heroku addons:create heroku-postgresql:essential-0
# On Windows use double quotes for the time zone, e.g.
# heroku pg:backups schedule --at "02:00 America/Los_Angeles" DATABASE_URL
heroku pg:backups schedule --at '02:00 America/Los_Angeles' DATABASE_URL
@ -24,10 +25,6 @@ Run these commands to deploy the project to Heroku:
# Assuming you chose Mailgun as mail service (see below for others)
heroku addons:create mailgun:starter
heroku config:set PYTHONHASHSEED=random
heroku config:set WEB_CONCURRENCY=4
heroku config:set DJANGO_DEBUG=False
heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production
heroku config:set DJANGO_SECRET_KEY="$(openssl rand -base64 64)"
@ -65,7 +62,7 @@ The script above assumes that you've chose Mailgun as email service. If you want
.. warning::
.. include:: mailgun.rst
.. include:: ../includes/mailgun.rst
Heroku & Docker
+++++++++++++++
@ -86,8 +83,6 @@ it's in the ``Procfile``, but is turned off by default:
.. code-block:: bash
# Set the broker URL to Redis
heroku config:set CELERY_BROKER_URL=`heroku config:get REDIS_URL`
# Scale dyno to 1 instance
heroku ps:scale worker=1

View File

@ -55,7 +55,7 @@ You will probably also need to setup the Mail backend, for example by adding a `
.. warning::
.. include:: mailgun.rst
.. include:: ../includes/mailgun.rst
Optional: Use AWS IAM Role for EC2 instance

View File

@ -8,7 +8,7 @@ Server Error on sign-up/log-in
Make sure you have configured the mail backend (e.g. Mailgun) by adding the API key and sender domain
.. include:: mailgun.rst
.. include:: ../includes/mailgun.rst
.. _docker-postgres-auth-failed:

View File

@ -0,0 +1,3 @@
```{include} ../../CONTRIBUTING.md
```

View File

@ -4,150 +4,30 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
SOURCEDIR = .
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
.PHONY: help clean html livehtml linkcheck
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{print substr($$1,1,index($$1,":")),c}1{c=0}' $(MAKEFILE_LIST) | column -s: -t
# Clean the build output
clean:
-rm -rf $(BUILDDIR)/*
# Build the HTML docs
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
$(SPHINXBUILD) -b html $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/html
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/{{ cookiecutter.project_slug }}.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/{{ cookiecutter.project_slug }}.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/{{ cookiecutter.project_slug }}"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/{{ cookiecutter.project_slug }}"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
# Build and serve docs with live reload
livehtml:
sphinx-autobuild -b html --port 9000 --watch . -c . $(SOURCEDIR) $(BUILDDIR)/html
# Check all external links for integrity
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
$(SPHINXBUILD) -b linkcheck $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

View File

@ -29,7 +29,10 @@ extensions = ["myst_parser"]
templates_path = ["_templates"]
# The suffix of source filenames.
source_suffix = [".rst", ".md"]
source_suffix = {
".rst": "restructuredtext",
".md": "markdown",
}
# The encoding of source files.
# source_encoding = 'utf-8-sig'
@ -185,7 +188,7 @@ latex_documents = [
"cookiecutter-django Documentation",
"cookiecutter-django",
"manual",
)
),
]
# The name of an image file (relative to this directory) to place at the top of
@ -220,7 +223,7 @@ man_pages = [
"Cookiecutter Django documentation",
["Daniel Roy Greenfeld"],
1,
)
),
]
# If true, show URL addresses after external links.
@ -239,7 +242,7 @@ texinfo_documents = [
"Cookiecutter Django documentation",
"Daniel Roy Greenfeld",
"Cookiecutter Django",
"A Cookiecutter template for creating production-ready " "Django projects quickly.",
"A Cookiecutter template for creating production-ready Django projects quickly.",
"Miscellaneous",
)
]

View File

@ -1,3 +0,0 @@
```{include} ../CONTRIBUTING.md
```

View File

@ -7,28 +7,51 @@ Powered by Cookiecutter_, Cookiecutter Django is a project template for jumpstar
.. _cookiecutter: https://github.com/cookiecutter/cookiecutter
Contents
--------
.. toctree::
:maxdepth: 2
:caption: Getting Started
1-getting-started/project-generation-options
1-getting-started/settings
.. toctree::
:maxdepth: 2
:caption: Local Development
project-generation-options
developing-locally
developing-locally-docker
settings
linters
testing
document
deployment-on-pythonanywhere
deployment-on-heroku
deployment-with-docker
docker-postgres-backups
websocket
faq
troubleshooting
contributing
maintainer-guide
2-local-development/developing-locally
2-local-development/developing-locally-docker
.. toctree::
:maxdepth: 2
:caption: Deployment
3-deployment/deployment-on-pythonanywhere
3-deployment/deployment-on-heroku
3-deployment/deployment-with-docker
.. toctree::
:maxdepth: 2
:caption: Guides
4-guides/docker-postgres-backups
4-guides/linters
4-guides/testing
4-guides/document
4-guides/websocket
.. toctree::
:maxdepth: 2
:caption: Help
5-help/faq
5-help/troubleshooting
.. toctree::
:maxdepth: 2
:caption: About
6-about/contributing
6-about/maintainer-guide
Indices and tables
------------------

View File

@ -5,36 +5,20 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS%
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. clean to clean the build directory
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. livehtml to build and serve docs with live reload
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
@ -45,132 +29,22 @@ if "%1" == "clean" (
)
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %SOURCEDIR% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if "%1" == "livehtml" (
sphinx-autobuild -b html --port 9000 --watch . -c . %SOURCEDIR% %BUILDDIR%/html
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\{{ cookiecutter.project_slug }}.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\{{ cookiecutter.project_slug }}.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %SOURCEDIR% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
@ -178,13 +52,4 @@ or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
:end

View File

@ -1,3 +0,0 @@
sphinx==7.4.7
sphinx-rtd-theme==2.0.0
myst-parser==4.0.0

View File

@ -1,21 +1,8 @@
"""
NOTE:
the below code is to be maintained Python 2.x-compatible
as the whole Cookiecutter Django project initialization
can potentially be run in Python 2.x environment
(at least so we presume in `pre_gen_project.py`).
TODO: restrict Cookiecutter Django project initialization to
Python 3.x environments only
"""
from __future__ import print_function
import json
import os
import random
import shutil
import string
from pathlib import Path
try:
# Inspired by
@ -37,40 +24,28 @@ DEBUG_VALUE = "debug"
def remove_open_source_files():
file_names = ["CONTRIBUTORS.txt", "LICENSE"]
for file_name in file_names:
os.remove(file_name)
Path(file_name).unlink()
def remove_gplv3_files():
file_names = ["COPYING"]
for file_name in file_names:
os.remove(file_name)
Path(file_name).unlink()
def remove_custom_user_manager_files():
os.remove(
os.path.join(
"{{cookiecutter.project_slug}}",
"users",
"managers.py",
)
)
os.remove(
os.path.join(
"{{cookiecutter.project_slug}}",
"users",
"tests",
"test_managers.py",
)
)
users_path = Path("{{cookiecutter.project_slug}}", "users")
(users_path / "managers.py").unlink()
(users_path / "tests" / "test_managers.py").unlink()
def remove_pycharm_files():
idea_dir_path = ".idea"
if os.path.exists(idea_dir_path):
idea_dir_path = Path(".idea")
if idea_dir_path.exists():
shutil.rmtree(idea_dir_path)
docs_dir_path = os.path.join("docs", "pycharm")
if os.path.exists(docs_dir_path):
docs_dir_path = Path("docs", "pycharm")
if docs_dir_path.exists():
shutil.rmtree(docs_dir_path)
@ -82,13 +57,18 @@ def remove_docker_files():
"docker-compose.local.yml",
"docker-compose.production.yml",
".dockerignore",
"justfile",
]
for file_name in file_names:
os.remove(file_name)
Path(file_name).unlink()
if "{{ cookiecutter.editor }}" == "PyCharm":
file_names = ["docker_compose_up_django.xml", "docker_compose_up_docs.xml"]
for file_name in file_names:
os.remove(os.path.join(".idea", "runConfigurations", file_name))
Path(".idea", "runConfigurations", file_name).unlink()
def remove_nginx_docker_files():
shutil.rmtree(Path("compose", "production", "nginx"))
def remove_utility_files():
@ -96,23 +76,23 @@ def remove_utility_files():
def remove_heroku_files():
file_names = ["Procfile", "runtime.txt", "requirements.txt"]
file_names = ["Procfile", "requirements.txt"]
for file_name in file_names:
if file_name == "requirements.txt" and "{{ cookiecutter.ci_tool }}".lower() == "travis":
# don't remove the file if we are using travisci but not using heroku
continue
os.remove(file_name)
Path(file_name).unlink()
shutil.rmtree("bin")
def remove_sass_files():
shutil.rmtree(os.path.join("{{cookiecutter.project_slug}}", "static", "sass"))
shutil.rmtree(Path("{{cookiecutter.project_slug}}", "static", "sass"))
def remove_gulp_files():
file_names = ["gulpfile.js"]
file_names = ["gulpfile.mjs"]
for file_name in file_names:
os.remove(file_name)
Path(file_name).unlink()
def remove_webpack_files():
@ -121,36 +101,30 @@ def remove_webpack_files():
def remove_vendors_js():
vendors_js_path = os.path.join(
"{{ cookiecutter.project_slug }}",
"static",
"js",
"vendors.js",
)
if os.path.exists(vendors_js_path):
os.remove(vendors_js_path)
vendors_js_path = Path("{{ cookiecutter.project_slug }}", "static", "js", "vendors.js")
if vendors_js_path.exists():
vendors_js_path.unlink()
def remove_packagejson_file():
file_names = ["package.json"]
for file_name in file_names:
os.remove(file_name)
Path(file_name).unlink()
def update_package_json(remove_dev_deps=None, remove_keys=None, scripts=None):
remove_dev_deps = remove_dev_deps or []
remove_keys = remove_keys or []
scripts = scripts or {}
with open("package.json", mode="r") as fd:
content = json.load(fd)
package_json = Path("package.json")
content = json.loads(package_json.read_text())
for package_name in remove_dev_deps:
content["devDependencies"].pop(package_name)
for key in remove_keys:
content.pop(key)
content["scripts"].update(scripts)
with open("package.json", mode="w") as fd:
json.dump(content, fd, ensure_ascii=False, indent=2)
fd.write("\n")
updated_content = json.dumps(content, ensure_ascii=False, indent=2) + "\n"
package_json.write_text(updated_content)
def handle_js_runner(choice, use_docker, use_async):
@ -175,7 +149,7 @@ def handle_js_runner(choice, use_docker, use_async):
remove_keys=["babel"],
scripts={
"dev": "gulp",
"build": "gulp generate-assets",
"build": "gulp build",
},
)
remove_webpack_files()
@ -214,8 +188,8 @@ def handle_js_runner(choice, use_docker, use_async):
def remove_prettier_pre_commit():
with open(".pre-commit-config.yaml", "r") as fd:
content = fd.readlines()
pre_commit_yaml = Path(".pre-commit-config.yaml")
content = pre_commit_yaml.read_text().splitlines()
removing = False
new_lines = []
@ -227,35 +201,34 @@ def remove_prettier_pre_commit():
if not removing:
new_lines.append(line)
with open(".pre-commit-config.yaml", "w") as fd:
fd.writelines(new_lines)
pre_commit_yaml.write_text("\n".join(new_lines))
def remove_celery_files():
file_names = [
os.path.join("config", "celery_app.py"),
os.path.join("{{ cookiecutter.project_slug }}", "users", "tasks.py"),
os.path.join("{{ cookiecutter.project_slug }}", "users", "tests", "test_tasks.py"),
file_paths = [
Path("config", "celery_app.py"),
Path("{{ cookiecutter.project_slug }}", "users", "tasks.py"),
Path("{{ cookiecutter.project_slug }}", "users", "tests", "test_tasks.py"),
]
for file_name in file_names:
os.remove(file_name)
for file_path in file_paths:
file_path.unlink()
def remove_async_files():
file_names = [
os.path.join("config", "asgi.py"),
os.path.join("config", "websocket.py"),
file_paths = [
Path("config", "asgi.py"),
Path("config", "websocket.py"),
]
for file_name in file_names:
os.remove(file_name)
for file_path in file_paths:
file_path.unlink()
def remove_dottravisyml_file():
os.remove(".travis.yml")
Path(".travis.yml").unlink()
def remove_dotgitlabciyml_file():
os.remove(".gitlab-ci.yml")
Path(".gitlab-ci.yml").unlink()
def remove_dotgithub_folder():
@ -263,7 +236,7 @@ def remove_dotgithub_folder():
def remove_dotdrone_file():
os.remove(".drone.yml")
Path(".drone.yml").unlink()
def generate_random_string(length, using_digits=False, using_ascii_letters=False, using_punctuation=False):
@ -289,7 +262,7 @@ def generate_random_string(length, using_digits=False, using_ascii_letters=False
return "".join([random.choice(symbols) for _ in range(length)])
def set_flag(file_path, flag, value=None, formatted=None, *args, **kwargs):
def set_flag(file_path: Path, flag, value=None, formatted=None, *args, **kwargs):
if value is None:
random_string = generate_random_string(*args, **kwargs)
if random_string is None:
@ -302,7 +275,7 @@ def set_flag(file_path, flag, value=None, formatted=None, *args, **kwargs):
random_string = formatted.format(random_string)
value = random_string
with open(file_path, "r+") as f:
with file_path.open("r+") as f:
file_contents = f.read().replace(flag, value)
f.seek(0)
f.write(file_contents)
@ -311,7 +284,7 @@ def set_flag(file_path, flag, value=None, formatted=None, *args, **kwargs):
return value
def set_django_secret_key(file_path):
def set_django_secret_key(file_path: Path):
django_secret_key = set_flag(
file_path,
"!!!SET DJANGO_SECRET_KEY!!!",
@ -322,7 +295,7 @@ def set_django_secret_key(file_path):
return django_secret_key
def set_django_admin_url(file_path):
def set_django_admin_url(file_path: Path):
django_admin_url = set_flag(
file_path,
"!!!SET DJANGO_ADMIN_URL!!!",
@ -377,16 +350,16 @@ def set_celery_flower_password(file_path, value=None):
def append_to_gitignore_file(ignored_line):
with open(".gitignore", "a") as gitignore_file:
with Path(".gitignore").open("a") as gitignore_file:
gitignore_file.write(ignored_line)
gitignore_file.write("\n")
def set_flags_in_envs(postgres_user, celery_flower_user, debug=False):
local_django_envs_path = os.path.join(".envs", ".local", ".django")
production_django_envs_path = os.path.join(".envs", ".production", ".django")
local_postgres_envs_path = os.path.join(".envs", ".local", ".postgres")
production_postgres_envs_path = os.path.join(".envs", ".production", ".postgres")
local_django_envs_path = Path(".envs", ".local", ".django")
production_django_envs_path = Path(".envs", ".production", ".django")
local_postgres_envs_path = Path(".envs", ".local", ".postgres")
production_postgres_envs_path = Path(".envs", ".production", ".postgres")
set_django_secret_key(production_django_envs_path)
set_django_admin_url(production_django_envs_path)
@ -403,35 +376,33 @@ def set_flags_in_envs(postgres_user, celery_flower_user, debug=False):
def set_flags_in_settings_files():
set_django_secret_key(os.path.join("config", "settings", "local.py"))
set_django_secret_key(os.path.join("config", "settings", "test.py"))
set_django_secret_key(Path("config", "settings", "local.py"))
set_django_secret_key(Path("config", "settings", "test.py"))
def remove_envs_and_associated_files():
shutil.rmtree(".envs")
os.remove("merge_production_dotenvs_in_dotenv.py")
Path("merge_production_dotenvs_in_dotenv.py").unlink()
shutil.rmtree("tests")
def remove_celery_compose_dirs():
shutil.rmtree(os.path.join("compose", "local", "django", "celery"))
shutil.rmtree(os.path.join("compose", "production", "django", "celery"))
shutil.rmtree(Path("compose", "local", "django", "celery"))
shutil.rmtree(Path("compose", "production", "django", "celery"))
def remove_node_dockerfile():
shutil.rmtree(os.path.join("compose", "local", "node"))
shutil.rmtree(Path("compose", "local", "node"))
def remove_aws_dockerfile():
shutil.rmtree(os.path.join("compose", "production", "aws"))
shutil.rmtree(Path("compose", "production", "aws"))
def remove_drf_starter_files():
os.remove(os.path.join("config", "api_router.py"))
shutil.rmtree(os.path.join("{{cookiecutter.project_slug}}", "users", "api"))
os.remove(os.path.join("{{cookiecutter.project_slug}}", "users", "tests", "test_drf_urls.py"))
os.remove(os.path.join("{{cookiecutter.project_slug}}", "users", "tests", "test_drf_views.py"))
os.remove(os.path.join("{{cookiecutter.project_slug}}", "users", "tests", "test_swagger.py"))
Path("config", "api_router.py").unlink()
shutil.rmtree(Path("{{cookiecutter.project_slug}}", "users", "api"))
shutil.rmtree(Path("{{cookiecutter.project_slug}}", "users", "tests", "api"))
def main():
@ -457,6 +428,8 @@ def main():
if "{{ cookiecutter.use_docker }}".lower() == "y":
remove_utility_files()
if "{{ cookiecutter.cloud_provider }}".lower() != "none":
remove_nginx_docker_files()
else:
remove_docker_files()

View File

@ -1,15 +1,3 @@
"""
NOTE:
the below code is to be maintained Python 2.x-compatible
as the whole Cookiecutter Django project initialization
can potentially be run in Python 2.x environment.
TODO: restrict Cookiecutter Django project initialization
to Python 3.x environments only
"""
from __future__ import print_function
import sys
TERMINATOR = "\x1b[0m"
@ -34,36 +22,10 @@ assert project_slug == project_slug.lower(), "'{}' project slug should be all lo
assert "\\" not in "{{ cookiecutter.author_name }}", "Don't include backslashes in author name."
if "{{ cookiecutter.use_docker }}".lower() == "n":
python_major_version = sys.version_info[0]
if python_major_version == 2:
print(
WARNING + "You're running cookiecutter under Python 2, but the generated "
"project requires Python 3.12+. Do you want to proceed (y/n)? " + TERMINATOR
)
yes_options, no_options = frozenset(["y"]), frozenset(["n"])
while True:
choice = raw_input().lower() # noqa: F821
if choice in yes_options:
break
elif choice in no_options:
print(INFO + "Generation process stopped as requested." + TERMINATOR)
sys.exit(1)
else:
print(
HINT
+ "Please respond with {} or {}: ".format(
", ".join(["'{}'".format(o) for o in yes_options if not o == ""]),
", ".join(["'{}'".format(o) for o in no_options if not o == ""]),
)
+ TERMINATOR
)
if "{{ cookiecutter.use_whitenoise }}".lower() == "n" and "{{ cookiecutter.cloud_provider }}" == "None":
print("You should either use Whitenoise or select a " "Cloud Provider to serve static files")
print("You should either use Whitenoise or select a Cloud Provider to serve static files")
sys.exit(1)
if "{{ cookiecutter.mail_service }}" == "Amazon SES" and "{{ cookiecutter.cloud_provider }}" != "AWS":
print("You should either use AWS or select a different " "Mail Service for sending emails.")
print("You should either use AWS or select a different Mail Service for sending emails.")
sys.exit(1)

View File

@ -1,6 +1,6 @@
[project]
name = "cookiecutter-django"
version = "2024.09.28"
version = "2025.04.03"
description = "A Cookiecutter template for creating production-ready Django projects quickly."
readme = "README.md"
keywords = [
@ -14,7 +14,7 @@ license = { text = "BSD" }
authors = [
{ name = "Daniel Roy Greenfeld", email = "pydanny@gmail.com" },
]
requires-python = ">=3.12"
requires-python = ">=3.12,<3.13"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
@ -28,8 +28,36 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development",
]
dependencies = [
"binaryornot==0.4.4",
"cookiecutter==2.6",
"django-upgrade==1.22.2",
"djlint==1.36.4",
"gitpython==3.1.43",
"jinja2==3.1.5",
"pre-commit==4.1.0",
"pygithub==2.5",
"pytest==8.3.4",
"pytest-cookies==0.7",
"pytest-instafail==0.5",
"pytest-xdist==3.6.1",
"pyyaml==6.0.2",
"requests==2.32.3",
"ruff==0.11.4",
"sh==2.1; sys_platform!='win23'",
"tox==4.23.2",
"tox-uv>=1.17",
]
urls = { Repository = "https://github.com/cookiecutter/cookiecutter-django" }
[dependency-groups]
docs = [
"myst-parser>=4",
"sphinx>=8.0.2",
"sphinx-autobuild>=2024.10.3",
"sphinx-rtd-theme>=3",
]
[tool.black]
line-length = 119
target-version = [
@ -47,7 +75,10 @@ known_first_party = [
"hooks",
]
# ==== djLint ====
[tool.pyproject-fmt]
keep_full_version = true
# ==== pytest ====
[tool.pytest.ini_options]
addopts = "-v --tb=short"
@ -61,7 +92,7 @@ norecursedirs = [
"*/{{cookiecutter.project_slug}}/*",
]
# ==== black ====
# ==== djLint ====
[tool.djlint]
blank_line_after_tag = "load,extends"

View File

@ -1,26 +0,0 @@
cookiecutter==2.6.0
sh==2.0.7; sys_platform != "win32"
binaryornot==0.4.4
# Code quality
# ------------------------------------------------------------------------------
ruff==0.6.8
django-upgrade==1.21.0
djlint==1.35.2
pre-commit==3.8.0
# Testing
# ------------------------------------------------------------------------------
tox==4.20.0
pytest==8.3.3
pytest-xdist==3.6.1
pytest-cookies==0.7.0
pytest-instafail==0.5.0
pyyaml==6.0.2
# Scripting
# ------------------------------------------------------------------------------
PyGithub==2.4.0
gitpython==3.1.43
jinja2==3.1.4
requests==2.32.3

View File

@ -12,7 +12,6 @@ from __future__ import annotations
import os
import re
import sys
from collections.abc import Iterable
from pathlib import Path
from typing import TYPE_CHECKING, Any, NamedTuple
@ -20,6 +19,8 @@ import requests
from github import Github
if TYPE_CHECKING:
from collections.abc import Iterable
from github.Issue import Issue
CURRENT_FILE = Path(__file__)
@ -83,7 +84,7 @@ def get_name_and_version(requirements_line: str) -> tuple[str, ...]:
def get_all_latest_django_versions(
django_max_version: tuple[DjVersion] = None,
django_max_version: tuple[DjVersion] | None = None,
) -> tuple[DjVersion, list[DjVersion]]:
"""
Grabs all Django versions that are worthy of a GitHub issue.
@ -221,8 +222,7 @@ class GitHubManager:
if supported_dj_versions:
if any(v >= needed_dj_version for v in supported_dj_versions):
return package_info["info"]["version"], ""
else:
return "", ""
return "", ""
# Django classifier DNE; assume it isn't a Django lib
# Great exceptions include pylint-django, where we need to do this manually...

69
scripts/node_version.py Normal file
View File

@ -0,0 +1,69 @@
from __future__ import annotations
import json
from pathlib import Path
ROOT = Path(__file__).parent.parent
TEMPLATED_ROOT = ROOT / "{{cookiecutter.project_slug}}"
DOCKERFILE = TEMPLATED_ROOT / "compose" / "local" / "node" / "Dockerfile"
PROD_DOCKERFILE = TEMPLATED_ROOT / "compose" / "production" / "django" / "Dockerfile"
PACKAGE_JSON = TEMPLATED_ROOT / "package.json"
CI_YML = ROOT / ".github" / "workflows" / "ci.yml"
def main() -> None:
new_version = get_version_from_dockerfile()
old_version = get_version_from_package_json()
if old_version != new_version:
update_package_json_version(old_version, new_version)
update_ci_node_version(old_version, new_version)
update_production_node_version(old_version, new_version)
def get_version_from_dockerfile() -> str:
# Extract version out of base image name:
# FROM docker.io/node:22.13-bookworm-slim
# -> 22.13
with DOCKERFILE.open("r") as f:
for line in f:
if "FROM docker.io/node:" in line:
_, _, docker_tag = line.partition(":")
version_str, _, _ = docker_tag.partition("-")
return version_str
raise RuntimeError("Could not find version in Dockerfile")
def get_version_from_package_json() -> str:
package_json = json.loads(PACKAGE_JSON.read_text())
return package_json["engines"]["node"]
def update_package_json_version(old_version: str, new_version: str) -> None:
package_json_text = PACKAGE_JSON.read_text()
package_json_text = package_json_text.replace(
f'"node": "{old_version}"',
f'"node": "{new_version}"',
)
PACKAGE_JSON.write_text(package_json_text)
def update_ci_node_version(old_version: str, new_version: str) -> None:
yml_content = CI_YML.read_text()
yml_content = yml_content.replace(
f'node-version: "{old_version}"',
f'node-version: "{new_version}"',
)
CI_YML.write_text(yml_content)
def update_production_node_version(old_version: str, new_version: str) -> None:
dockerfile_content = PROD_DOCKERFILE.read_text()
dockerfile_content = dockerfile_content.replace(
f"FROM docker.io/node:{old_version}",
f"FROM docker.io/node:{new_version}",
)
PROD_DOCKERFILE.write_text(dockerfile_content)
if __name__ == "__main__":
main()

56
scripts/ruff_version.py Normal file
View File

@ -0,0 +1,56 @@
from __future__ import annotations
import subprocess
import tomllib
from pathlib import Path
ROOT = Path(__file__).parent.parent
TEMPLATED_ROOT = ROOT / "{{cookiecutter.project_slug}}"
REQUIREMENTS_LOCAL_TXT = TEMPLATED_ROOT / "requirements" / "local.txt"
PRE_COMMIT_CONFIG = TEMPLATED_ROOT / ".pre-commit-config.yaml"
PYPROJECT_TOML = ROOT / "pyproject.toml"
def main() -> None:
new_version = get_requirements_txt_version()
old_version = get_pyproject_toml_version()
if old_version == new_version:
return
update_ruff_version(old_version, new_version)
subprocess.run(["uv", "lock", "--no-upgrade"], cwd=ROOT)
def get_requirements_txt_version() -> str:
content = REQUIREMENTS_LOCAL_TXT.read_text()
for line in content.split("\n"):
if line.startswith("ruff"):
return line.split(" ")[0].split("==")[1]
raise RuntimeError("Could not find ruff version in requirements/local.txt")
def get_pyproject_toml_version() -> str:
data = tomllib.loads(PYPROJECT_TOML.read_text())
for dependency in data["project"]["dependencies"]:
if dependency.startswith("ruff=="):
return dependency.split("==")[1]
raise RuntimeError("Could not find ruff version in pyproject.toml")
def update_ruff_version(old_version: str, new_version: str) -> None:
# Update pyproject.toml
new_content = PYPROJECT_TOML.read_text().replace(
f"ruff=={old_version}",
f"ruff=={new_version}",
)
PYPROJECT_TOML.write_text(new_content)
# Update pre-commit config
new_content = PRE_COMMIT_CONFIG.read_text().replace(
f"repo: https://github.com/astral-sh/ruff-pre-commit\n rev: v{old_version}",
f"repo: https://github.com/astral-sh/ruff-pre-commit\n rev: v{new_version}",
)
PRE_COMMIT_CONFIG.write_text(new_content)
if __name__ == "__main__":
main()

View File

@ -1,6 +1,7 @@
import datetime as dt
import os
import re
import subprocess
from collections.abc import Iterable
from pathlib import Path
@ -51,8 +52,12 @@ def main() -> None:
update_version(setup_py_path, release)
print(f"Updated version in {setup_py_path}")
# Run uv lock
uv_lock_path = ROOT / "uv.lock"
subprocess.run(["uv", "lock", "--no-upgrade"], cwd=ROOT)
# Commit changes, create tag and push
update_git_repo([changelog_path, setup_py_path], release)
update_git_repo([changelog_path, setup_py_path, uv_lock_path], release)
# Create GitHub release
github_release = repo.create_git_release(

View File

@ -11,7 +11,7 @@ mkdir -p .cache/bare
cd .cache/bare
# create the project using the default settings in cookiecutter.json
cookiecutter ../../ --no-input --overwrite-if-exists use_docker=n "$@"
uv run cookiecutter ../../ --no-input --overwrite-if-exists use_docker=n "$@"
cd my_awesome_project
# Install OS deps

View File

@ -2,6 +2,8 @@ import glob
import os
import re
import sys
from collections.abc import Iterable
from pathlib import Path
import pytest
@ -61,7 +63,6 @@ SUPPORTED_COMBINATIONS = [
{"postgresql_version": "15"},
{"postgresql_version": "14"},
{"postgresql_version": "13"},
{"postgresql_version": "12"},
{"cloud_provider": "AWS", "use_whitenoise": "y"},
{"cloud_provider": "AWS", "use_whitenoise": "n"},
{"cloud_provider": "GCP", "use_whitenoise": "y"},
@ -146,19 +147,19 @@ def _fixture_id(ctx):
return "-".join(f"{key}:{value}" for key, value in ctx.items())
def build_files_list(base_dir):
def build_files_list(base_path: Path):
"""Build a list containing absolute paths to the generated files."""
return [os.path.join(dirpath, file_path) for dirpath, subdirs, files in os.walk(base_dir) for file_path in files]
return [dirpath / file_path for dirpath, subdirs, files in base_path.walk() for file_path in files]
def check_paths(paths):
def check_paths(paths: Iterable[Path]):
"""Method to check all paths have correct substitutions."""
# Assert that no match is found in any of the files
for path in paths:
if is_binary(path):
if is_binary(str(path)):
continue
for line in open(path):
for line in path.open():
match = RE_OBJ.search(line)
assert match is None, f"cookiecutter variable not replaced in {path}"
@ -173,7 +174,7 @@ def test_project_generation(cookies, context, context_override):
assert result.project_path.name == context["project_slug"]
assert result.project_path.is_dir()
paths = build_files_list(str(result.project_path))
paths = build_files_list(result.project_path)
assert paths
check_paths(paths)
@ -271,7 +272,7 @@ def test_djlint_check_passes(cookies, context_override):
@pytest.mark.parametrize(
["use_docker", "expected_test_script"],
("use_docker", "expected_test_script"),
[
("n", "pytest"),
("y", "docker compose -f docker-compose.local.yml run django pytest"),
@ -286,7 +287,7 @@ def test_travis_invokes_pytest(cookies, context, use_docker, expected_test_scrip
assert result.project_path.name == context["project_slug"]
assert result.project_path.is_dir()
with open(f"{result.project_path}/.travis.yml") as travis_yml:
with (result.project_path / ".travis.yml").open() as travis_yml:
try:
yml = yaml.safe_load(travis_yml)["jobs"]["include"]
assert yml[0]["script"] == ["ruff check ."]
@ -296,7 +297,7 @@ def test_travis_invokes_pytest(cookies, context, use_docker, expected_test_scrip
@pytest.mark.parametrize(
["use_docker", "expected_test_script"],
("use_docker", "expected_test_script"),
[
("n", "pytest"),
("y", "docker compose -f docker-compose.local.yml run django pytest"),
@ -311,11 +312,11 @@ def test_gitlab_invokes_precommit_and_pytest(cookies, context, use_docker, expec
assert result.project_path.name == context["project_slug"]
assert result.project_path.is_dir()
with open(f"{result.project_path}/.gitlab-ci.yml") as gitlab_yml:
with (result.project_path / ".gitlab-ci.yml").open() as gitlab_yml:
try:
gitlab_config = yaml.safe_load(gitlab_yml)
assert gitlab_config["precommit"]["script"] == [
"pre-commit run --show-diff-on-failure --color=always --all-files"
"pre-commit run --show-diff-on-failure --color=always --all-files",
]
assert gitlab_config["pytest"]["script"] == [expected_test_script]
except yaml.YAMLError as e:
@ -323,7 +324,7 @@ def test_gitlab_invokes_precommit_and_pytest(cookies, context, use_docker, expec
@pytest.mark.parametrize(
["use_docker", "expected_test_script"],
("use_docker", "expected_test_script"),
[
("n", "pytest"),
("y", "docker compose -f docker-compose.local.yml run django pytest"),
@ -338,7 +339,7 @@ def test_github_invokes_linter_and_pytest(cookies, context, use_docker, expected
assert result.project_path.name == context["project_slug"]
assert result.project_path.is_dir()
with open(f"{result.project_path}/.github/workflows/ci.yml") as github_yml:
with (result.project_path / ".github" / "workflows" / "ci.yml").open() as github_yml:
try:
github_config = yaml.safe_load(github_yml)
linter_present = False
@ -378,7 +379,7 @@ def test_error_if_incompatible(cookies, context, invalid_context):
@pytest.mark.parametrize(
["editor", "pycharm_docs_exist"],
("editor", "pycharm_docs_exist"),
[
("None", False),
("PyCharm", True),
@ -389,9 +390,9 @@ def test_pycharm_docs_removed(cookies, context, editor, pycharm_docs_exist):
context.update({"editor": editor})
result = cookies.bake(extra_context=context)
with open(f"{result.project_path}/docs/index.rst") as f:
has_pycharm_docs = "pycharm/configuration" in f.read()
assert has_pycharm_docs is pycharm_docs_exist
index_rst = result.project_path / "docs" / "index.rst"
has_pycharm_docs = "pycharm/configuration" in index_rst.read_text()
assert has_pycharm_docs is pycharm_docs_exist
def test_trim_domain_email(cookies, context):
@ -401,7 +402,7 @@ def test_trim_domain_email(cookies, context):
"use_docker": "y",
"domain_name": " example.com ",
"email": " me@example.com ",
}
},
)
result = cookies.bake(extra_context=context)

View File

@ -11,29 +11,28 @@ mkdir -p .cache/docker
cd .cache/docker
# create the project using the default settings in cookiecutter.json
cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y "$@"
uv run cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y "$@"
cd my_awesome_project
# make sure all images build
docker compose -f docker-compose.local.yml build
# run the project's type checks
docker compose -f docker-compose.local.yml run django mypy my_awesome_project
docker compose -f docker-compose.local.yml run --rm django mypy my_awesome_project
# run the project's tests
docker compose -f docker-compose.local.yml run django pytest
docker compose -f docker-compose.local.yml run --rm django pytest
# return non-zero status code if there are migrations that have not been created
docker compose -f docker-compose.local.yml run django python manage.py makemigrations --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; }
docker compose -f docker-compose.local.yml run --rm django python manage.py makemigrations --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; }
# Test support for translations
docker compose -f docker-compose.local.yml run django python manage.py makemessages --all
docker compose -f docker-compose.local.yml run --rm django python manage.py makemessages --all
# Make sure the check doesn't raise any warnings
docker compose -f docker-compose.local.yml run \
docker compose -f docker-compose.local.yml run --rm \
-e DJANGO_SECRET_KEY="$(openssl rand -base64 64)" \
-e REDIS_URL=redis://redis:6379/0 \
-e CELERY_BROKER_URL=redis://redis:6379/0 \
-e DJANGO_AWS_ACCESS_KEY_ID=x \
-e DJANGO_AWS_SECRET_ACCESS_KEY=x \
-e DJANGO_AWS_STORAGE_BUCKET_NAME=x \
@ -43,10 +42,10 @@ docker compose -f docker-compose.local.yml run \
django python manage.py check --settings=config.settings.production --deploy --database default --fail-level WARNING
# Generate the HTML for the documentation
docker compose -f docker-compose.docs.yml run docs make html
docker compose -f docker-compose.docs.yml run --rm docs make html
# Run npm build script if package.json is present
if [ -f "package.json" ]
then
docker compose -f docker-compose.local.yml run node npm run build
docker compose -f docker-compose.local.yml run --rm node npm run build
fi

View File

@ -8,7 +8,7 @@ import pytest
from hooks.post_gen_project import append_to_gitignore_file
@pytest.fixture()
@pytest.fixture
def working_directory(tmp_path):
prev_cwd = Path.cwd()
os.chdir(tmp_path)

View File

@ -3,7 +3,6 @@ skipsdist = true
envlist = py312,black-template
[testenv]
deps = -rrequirements.txt
passenv = AUTOFIXABLE_STYLES
commands = pytest -n auto {posargs:./tests}

1240
uv.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ environment:
POSTGRES_DB: 'test_{{ cookiecutter.project_slug }}'
POSTGRES_HOST_AUTH_METHOD: trust
{%- if cookiecutter.use_celery == 'y' %}
CELERY_BROKER_URL: 'redis://redis:6379/0'
REDIS_URL: 'redis://redis:6379/0'
{%- endif %}
steps:

View File

@ -12,7 +12,7 @@ trim_trailing_whitespace = true
indent_style = space
indent_size = 4
[*.{html,css,scss,json,yml,xml}]
[*.{html,css,scss,json,yml,xml,toml}]
indent_style = space
indent_size = 2

View File

@ -9,16 +9,20 @@ updates:
# Every weekday
schedule:
interval: 'daily'
groups:
github-actions:
patterns:
- '*'
{%- if cookiecutter.use_docker == 'y' %}
# Enable version updates for Docker
# We need to specify each Dockerfile in a separate entry because Dependabot doesn't
# support wildcards or recursively checking subdirectories. Check this issue for updates:
# https://github.com/dependabot/dependabot-core/issues/2178
- package-ecosystem: 'docker'
# Look for a `Dockerfile` in the `compose/local/django` directory
directory: 'compose/local/django/'
directories:
- 'compose/local/django/'
- 'compose/local/docs/'
- 'compose/production/django/'
# Every weekday
schedule:
interval: 'daily'
@ -28,81 +32,41 @@ updates:
update-types:
- 'version-update:semver-major'
- 'version-update:semver-minor'
groups:
docker-python:
patterns:
- '*'
- package-ecosystem: 'docker'
# Look for a `Dockerfile` in the `compose/local/docs` directory
directory: 'compose/local/docs/'
# Every weekday
schedule:
interval: 'daily'
# Ignore minor version updates (3.10 -> 3.11) but update patch versions
ignore:
- dependency-name: '*'
update-types:
- 'version-update:semver-major'
- 'version-update:semver-minor'
- package-ecosystem: 'docker'
# Look for a `Dockerfile` in the `compose/local/node` directory
directory: 'compose/local/node/'
# Every weekday
schedule:
interval: 'daily'
- package-ecosystem: 'docker'
# Look for a `Dockerfile` in the `compose/production/aws` directory
directory: 'compose/production/aws/'
# Every weekday
schedule:
interval: 'daily'
- package-ecosystem: 'docker'
# Look for a `Dockerfile` in the `compose/production/django` directory
directory: 'compose/production/django/'
# Every weekday
schedule:
interval: 'daily'
# Ignore minor version updates (3.10 -> 3.11) but update patch versions
ignore:
- dependency-name: '*'
update-types:
- 'version-update:semver-major'
- 'version-update:semver-minor'
- package-ecosystem: 'docker'
# Look for a `Dockerfile` in the `compose/production/postgres` directory
directory: 'compose/production/postgres/'
# Every weekday
schedule:
interval: 'daily'
- package-ecosystem: 'docker'
# Look for a `Dockerfile` in the `compose/production/traefik` directory
directory: 'compose/production/traefik/'
# Every weekday
schedule:
interval: 'daily'
# Look for a `Dockerfile` in the listed directories
directories:
- 'compose/local/node/'
- 'compose/production/aws/'
- 'compose/production/postgres/'
- 'compose/production/traefik/'
{%- if cookiecutter.cloud_provider == 'None' %}
- package-ecosystem: 'docker'
# Look for a `Dockerfile` in the `compose/production/nginx` directory
directory: 'compose/production/nginx/'
- 'compose/production/nginx/'
{%- endif %}
# Every weekday
schedule:
interval: 'daily'
{%- endif %}
{%- endif %}
# Enable version updates for Python/Pip - Production
- package-ecosystem: 'pip'
# Look for a `requirements.txt` in the `root` directory
# also 'setup.cfg', 'runtime.txt' and 'requirements/*.txt'
# also 'setup.cfg', '.python-version' and 'requirements/*.txt'
directory: '/'
# Every weekday
schedule:
interval: 'daily'
groups:
python:
update-types:
- 'minor'
- 'patch'
{%- if cookiecutter.frontend_pipeline == 'Gulp' %}
@ -113,5 +77,10 @@ updates:
# Every weekday
schedule:
interval: 'daily'
groups:
javascript:
update-types:
- 'minor'
- 'patch'
{%- endif %}

View File

@ -28,7 +28,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version-file: '.python-version'
{%- if cookiecutter.open_source_license != 'Not open source' %}
# Consider using pre-commit.ci for open source project
@ -57,7 +57,7 @@ jobs:
env:
{%- if cookiecutter.use_celery == 'y' %}
CELERY_BROKER_URL: 'redis://localhost:6379/0'
REDIS_URL: 'redis://localhost:6379/0'
{%- endif %}
# postgres://user:password@host:port/database
DATABASE_URL: 'postgres://postgres:postgres@localhost:5432/postgres'
@ -68,11 +68,31 @@ jobs:
uses: actions/checkout@v4
{%- if cookiecutter.use_docker == 'y' %}
- name: Build the Stack
run: docker compose -f docker-compose.local.yml build django
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the docs
run: docker compose -f docker-compose.docs.yml build docs
- name: Build and cache local backend
uses: docker/bake-action@v6
with:
push: false
load: true
files: docker-compose.local.yml
targets: django
set: |
django.cache-from=type=gha,scope=django-cached-tests
django.cache-to=type=gha,scope=django-cached-tests,mode=max
postgres.cache-from=type=gha,scope=postgres-cached-tests
postgres.cache-to=type=gha,scope=postgres-cached-tests,mode=max
- name: Build and cache docs
uses: docker/bake-action@v6
with:
push: false
load: true
files: docker-compose.docs.yml
set: |
docs.cache-from=type=gha,scope=cached-docs
docs.cache-to=type=gha,scope=cached-docs,mode=max
- name: Check DB Migrations
run: docker compose -f docker-compose.local.yml run --rm django python manage.py makemigrations --check
@ -88,9 +108,9 @@ jobs:
{%- else %}
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version-file: '.python-version'
cache: pip
cache-dependency-path: |
requirements/base.txt

View File

@ -59,9 +59,6 @@ docs/_build/
# PyBuilder
target/
# pyenv
.python-version
{% if cookiecutter.use_celery == 'y' -%}
# celery beat schedule file
celerybeat-schedule

View File

@ -8,7 +8,7 @@ variables:
POSTGRES_DB: 'test_{{ cookiecutter.project_slug }}'
POSTGRES_HOST_AUTH_METHOD: trust
{%- if cookiecutter.use_celery == 'y' %}
CELERY_BROKER_URL: 'redis://redis:6379/0'
REDIS_URL: 'redis://redis:6379/0'
{%- endif %}
precommit:

View File

@ -1,12 +1,13 @@
exclude: '^docs/|/migrations/|devcontainer.json'
default_stages: [commit]
default_stages: [pre-commit]
minimum_pre_commit_version: "3.2.0"
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@ -28,14 +29,14 @@ repos:
exclude: '{{cookiecutter.project_slug}}/templates/'
- repo: https://github.com/adamchainz/django-upgrade
rev: '1.21.0'
rev: '1.24.0'
hooks:
- id: django-upgrade
args: ['--target-version', '5.0']
# Run the Ruff linter.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
rev: v0.11.4
hooks:
# Linter
- id: ruff
@ -44,7 +45,7 @@ repos:
- id: ruff-format
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.35.2
rev: v1.36.4
hooks:
- id: djlint-reformat-django
- id: djlint-django

View File

@ -0,0 +1 @@
3.12

View File

@ -12,7 +12,7 @@ License: {{cookiecutter.open_source_license}}
## Settings
Moved to [settings](http://cookiecutter-django.readthedocs.io/en/latest/settings.html).
Moved to [settings](https://cookiecutter-django.readthedocs.io/en/latest/1-getting-started/settings.html).
## Basic Commands
@ -46,7 +46,7 @@ To run the tests, check your test coverage, and generate an HTML coverage report
### Live reloading and Sass CSS compilation
Moved to [Live reloading and SASS compilation](https://cookiecutter-django.readthedocs.io/en/latest/developing-locally.html#sass-compilation-live-reloading).
Moved to [Live reloading and SASS compilation](https://cookiecutter-django.readthedocs.io/en/latest/2-local-development/developing-locally.html#using-webpack-or-gulp).
{%- if cookiecutter.use_celery == "y" %}
@ -87,7 +87,7 @@ celery -A config.celery_app worker -B -l info
In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server [Mailpit](https://github.com/axllent/mailpit) with a web interface is available as docker container.
Container mailpit will start automatically when you will run all docker containers.
Please check [cookiecutter-django Docker documentation](http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html) for more details how to start all containers.
Please check [cookiecutter-django Docker documentation](https://cookiecutter-django.readthedocs.io/en/latest/2-local-development/developing-locally-docker.html) for more details how to start all containers.
With Mailpit running, to view messages that are sent by your application, open your browser and go to `http://127.0.0.1:8025`
{%- else %}
@ -130,14 +130,14 @@ The following details how to deploy this application.
### Heroku
See detailed [cookiecutter-django Heroku documentation](http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-heroku.html).
See detailed [cookiecutter-django Heroku documentation](https://cookiecutter-django.readthedocs.io/en/latest/3-deployment/deployment-on-heroku.html).
{%- endif %}
{%- if cookiecutter.use_docker.lower() == "y" %}
### Docker
See detailed [cookiecutter-django Docker documentation](http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html).
See detailed [cookiecutter-django Docker documentation](https://cookiecutter-django.readthedocs.io/en/latest/3-deployment/deployment-with-docker.html).
{%- endif %}
{%- if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] %}

View File

@ -1,5 +1,5 @@
# define an alias for the specific python version used in this file.
FROM docker.io/python:3.12.6-slim-bookworm AS python
FROM docker.io/python:3.12.9-slim-bookworm AS python
# Python build stage
FROM python AS python-build-stage
@ -48,7 +48,8 @@ RUN groupadd --gid 1000 dev-user \
# Install required system dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
# psycopg dependencies
libpq-dev \
libpq-dev \
wait-for-it \
# Translations dependencies
gettext \
# cleaning up unused files

View File

@ -13,4 +13,4 @@ echo 'Starting flower'
exec watchfiles --filter python celery.__main__.main \
--args \
"-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\""
"-A config.celery_app -b \"${REDIS_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\""

View File

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

View File

@ -1,4 +1,4 @@
FROM docker.io/node:22-bookworm-slim
FROM docker.io/node:22.14-bookworm-slim
WORKDIR /app

View File

@ -1,4 +1,4 @@
FROM docker.io/amazon/aws-cli:2.17.0
FROM docker.io/amazon/aws-cli:2.25.0
# Clear entrypoint from the base image, otherwise it's always calling the aws CLI
ENTRYPOINT []

View File

@ -1,5 +1,5 @@
{% if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] -%}
FROM docker.io/node:20-bookworm-slim AS client-builder
FROM docker.io/node:22.14-bookworm-slim AS client-builder
ARG APP_HOME=/app
WORKDIR ${APP_HOME}
@ -25,7 +25,7 @@ RUN npm run build
{%- endif %}
# define an alias for the specific python version used in this file.
FROM docker.io/python:3.12.6-slim-bookworm AS python
FROM docker.io/python:3.12.9-slim-bookworm AS python
# Python build stage
FROM python AS python-build-stage
@ -39,6 +39,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
# psycopg dependencies
libpq-dev
# Requirements are installed here to ensure they will be cached.
COPY ./requirements .
@ -60,7 +61,7 @@ ENV BUILD_ENV=${BUILD_ENVIRONMENT}
WORKDIR ${APP_HOME}
RUN addgroup --system django \
&& adduser --system --ingroup django django
&& adduser --system --ingroup django django
# Install required system dependencies
@ -69,6 +70,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
libpq-dev \
# Translations dependencies
gettext \
# entrypoint
wait-for-it \
# cleaning up unused files
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*
@ -122,9 +125,6 @@ RUN chown -R django:django ${APP_HOME}
USER django
RUN DATABASE_URL="" \
{%- if cookiecutter.use_celery == "y" %}
CELERY_BROKER_URL="" \
{%- endif %}
DJANGO_SETTINGS_MODULE="config.settings.test" \
python manage.py compilemessages

View File

@ -14,6 +14,6 @@ echo 'Starting flower'
exec celery \
-A config.celery_app \
-b "${CELERY_BROKER_URL}" \
-b "${REDIS_URL}" \
flower \
--basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}"

View File

@ -4,45 +4,13 @@ set -o errexit
set -o pipefail
set -o nounset
{% if cookiecutter.use_celery == 'y' %}
# N.B. If only .env files supported variable expansion...
export CELERY_BROKER_URL="${REDIS_URL}"
{% endif %}
if [ -z "${POSTGRES_USER}" ]; then
base_postgres_image_default_user='postgres'
export POSTGRES_USER="${base_postgres_image_default_user}"
fi
export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
python << END
import sys
import time
import psycopg
suggest_unrecoverable_after = 30
start = time.time()
while True:
try:
psycopg.connect(
dbname="${POSTGRES_DB}",
user="${POSTGRES_USER}",
password="${POSTGRES_PASSWORD}",
host="${POSTGRES_HOST}",
port="${POSTGRES_PORT}",
)
break
except psycopg.OperationalError as error:
sys.stderr.write("Waiting for PostgreSQL to become available...\n")
if time.time() - start > suggest_unrecoverable_after:
sys.stderr.write(" This is taking longer than expected. The following exception may be indicative of an unrecoverable error: '{}'\n".format(error))
time.sleep(1)
END
wait-for-it "${POSTGRES_HOST}:${POSTGRES_PORT}" -t 30
>&2 echo 'PostgreSQL is available'

View File

@ -1,4 +1,4 @@
FROM docker.io/traefik:3.1.4
FROM docker.io/traefik:3.3.5
RUN mkdir -p /etc/traefik/acme \
&& touch /etc/traefik/acme/acme.json \
&& chmod 600 /etc/traefik/acme/acme.json

View File

@ -1,4 +1,3 @@
# ruff: noqa
"""
ASGI config for {{ cookiecutter.project_name }} project.
@ -25,12 +24,9 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
# This application object is used by any ASGI server configured to use this file.
django_application = get_asgi_application()
# Apply ASGI middleware here.
# from helloworld.asgi import HelloWorldApplication
# application = HelloWorldApplication(application)
# Import websocket application here, so apps from django_application are loaded first
from config.websocket import websocket_application
from config.websocket import websocket_application # noqa: E402
async def application(scope, receive, send):

View File

@ -1,6 +1,7 @@
import os
from celery import Celery
from celery.signals import setup_logging
# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
@ -13,5 +14,15 @@ app = Celery("{{cookiecutter.project_slug}}")
# should have a `CELERY_` prefix.
app.config_from_object("django.conf:settings", namespace="CELERY")
@setup_logging.connect
def config_loggers(*args, **kwargs):
from logging.config import dictConfig
from django.conf import settings
dictConfig(settings.LOGGING)
# Load task modules from all registered Django app configs.
app.autodiscover_tasks()

View File

@ -1,6 +1,9 @@
# ruff: noqa: ERA001, E501
"""Base settings to build other settings files upon."""
{% if cookiecutter.use_celery == 'y' -%}
import ssl
{%- endif %}
from pathlib import Path
import environ
@ -282,6 +285,9 @@ LOGGING = {
"root": {"level": "INFO", "handlers": ["console"]},
}
REDIS_URL = env("REDIS_URL", default="redis://{% if cookiecutter.use_docker == 'y' %}redis{%else%}localhost{% endif %}:6379/0")
REDIS_SSL = REDIS_URL.startswith("rediss://")
{% if cookiecutter.use_celery == 'y' -%}
# Celery
# ------------------------------------------------------------------------------
@ -289,9 +295,13 @@ if USE_TZ:
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-timezone
CELERY_TIMEZONE = TIME_ZONE
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-broker_url
CELERY_BROKER_URL = env("CELERY_BROKER_URL")
CELERY_BROKER_URL = REDIS_URL
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#redis-backend-use-ssl
CELERY_BROKER_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE} if REDIS_SSL else None
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-result_backend
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
CELERY_RESULT_BACKEND = REDIS_URL
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#redis-backend-use-ssl
CELERY_REDIS_BACKEND_USE_SSL = CELERY_BROKER_USE_SSL
# 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
@ -317,18 +327,20 @@ CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"
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
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#worker-hijack-root-logger
CELERY_WORKER_HIJACK_ROOT_LOGGER = False
{%- endif %}
# django-allauth
# ------------------------------------------------------------------------------
ACCOUNT_ALLOW_REGISTRATION = env.bool("DJANGO_ACCOUNT_ALLOW_REGISTRATION", True)
# https://docs.allauth.org/en/latest/account/configuration.html
ACCOUNT_AUTHENTICATION_METHOD = "{{cookiecutter.username_type}}"
ACCOUNT_LOGIN_METHODS = {"{{cookiecutter.username_type}}"}
# https://docs.allauth.org/en/latest/account/configuration.html
ACCOUNT_EMAIL_REQUIRED = True
{%- if cookiecutter.username_type == "email" %}
# https://docs.allauth.org/en/latest/account/configuration.html
ACCOUNT_USERNAME_REQUIRED = False
{%- if cookiecutter.username_type == "username" %}
ACCOUNT_SIGNUP_FIELDS = ["email*", "username*", "password1*", "password2*"]
{%- else %}
ACCOUNT_SIGNUP_FIELDS = ["email*", "password1*", "password2*"]
# https://docs.allauth.org/en/latest/account/configuration.html
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
{%- endif %}

View File

@ -16,6 +16,7 @@ from sentry_sdk.integrations.redis import RedisIntegration
from .base import * # noqa: F403
from .base import DATABASES
from .base import INSTALLED_APPS
from .base import REDIS_URL
{%- if cookiecutter.use_drf == "y" %}
from .base import SPECTACULAR_SETTINGS
{%- endif %}
@ -37,10 +38,10 @@ DATABASES["default"]["CONN_MAX_AGE"] = env.int("CONN_MAX_AGE", default=60)
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": env("REDIS_URL"),
"LOCATION": REDIS_URL,
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
# Mimicing memcache behavior.
# Mimicking memcache behavior.
# https://github.com/jazzband/django-redis#memcached-exceptions-behavior
"IGNORE_EXCEPTIONS": True,
},
@ -170,7 +171,7 @@ STORAGES = {
"BACKEND": "storages.backends.azure_storage.AzureStorage",
"OPTIONS": {
"location": "media",
"file_overwrite": False,
"overwrite_files": False,
},
},
{%- if cookiecutter.use_whitenoise == 'y' %}
@ -323,7 +324,7 @@ COMPRESS_FILTERS = {
"js": ["compressor.filters.jsmin.JSMinFilter"],
}
{% endif %}
{%- if cookiecutter.use_whitenoise == 'n' -%}
{%- if cookiecutter.use_whitenoise == 'n' and cookiecutter.cloud_provider in ('AWS', 'GCP') -%}
# Collectfasta
# ------------------------------------------------------------------------------
# https://github.com/jasongi/collectfasta#installation

View File

@ -33,7 +33,7 @@ TEMPLATES[0]["OPTIONS"]["debug"] = True # type: ignore[index]
# MEDIA
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#media-url
MEDIA_URL = "http://media.testserver"
MEDIA_URL = "http://media.testserver/"
{%- if cookiecutter.frontend_pipeline == 'Webpack' %}
# django-webpack-loader

View File

@ -1,4 +1,3 @@
# ruff: noqa
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
@ -43,7 +42,7 @@ urlpatterns += [
# API base url
path("api/", include("config.api_router")),
# DRF auth token
path("api/auth-token/", obtain_auth_token),
path("api/auth-token/", obtain_auth_token, name="obtain_auth_token"),
path("api/schema/", SpectacularAPIView.as_view(), name="api-schema"),
path(
"api/docs/",
@ -77,4 +76,7 @@ if settings.DEBUG:
if "debug_toolbar" in settings.INSTALLED_APPS:
import debug_toolbar
urlpatterns = [path("__debug__/", include(debug_toolbar.urls))] + urlpatterns
urlpatterns = [
path("__debug__/", include(debug_toolbar.urls)),
*urlpatterns,
]

View File

@ -1,4 +1,3 @@
# ruff: noqa
"""
WSGI config for {{ cookiecutter.project_name }} project.
@ -25,16 +24,9 @@ from django.core.wsgi import get_wsgi_application
# {{ cookiecutter.project_slug }} directory.
BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
sys.path.append(str(BASE_DIR / "{{ cookiecutter.project_slug }}"))
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
# if running multiple sites in the same mod_wsgi process. To fix this, use
# mod_wsgi daemon mode with each site in its own daemon process, or use
# os.environ["DJANGO_SETTINGS_MODULE"] = "config.settings.production"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production")
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.
application = get_wsgi_application()
# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)

View File

@ -1,4 +1,4 @@
# ruff: noqa
# ruff: noqa: ERA001, PTH100
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
@ -13,9 +13,10 @@
import os
import sys
import django
if os.getenv("READTHEDOCS", default=False) == "True":
if os.getenv("READTHEDOCS", default="False") == "True":
sys.path.insert(0, os.path.abspath(".."))
os.environ["DJANGO_READ_DOT_ENV_FILE"] = "True"
os.environ["USE_DOCKER"] = "no"
@ -26,16 +27,13 @@ else:
sys.path.insert(0, os.path.abspath(".."))
{%- endif %}
os.environ["DATABASE_URL"] = "sqlite:///readthedocs.db"
{%- if cookiecutter.use_celery == 'y' %}
os.environ["CELERY_BROKER_URL"] = os.getenv("REDIS_URL", "redis://redis:6379")
{%- endif %}
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
django.setup()
# -- Project information -----------------------------------------------------
project = "{{ cookiecutter.project_name }}"
copyright = """{% now 'utc', '%Y' %}, {{ cookiecutter.author_name }}"""
copyright = """{% now 'utc', '%Y' %}, {{ cookiecutter.author_name }}""" # noqa: A001
author = "{{ cookiecutter.author_name }}"

View File

@ -3,28 +3,32 @@
////////////////////////////////
// Gulp and package
const { src, dest, parallel, series, watch } = require('gulp');
const pjson = require('./package.json');
import { src, dest, parallel, series, task, watch } from 'gulp';
import pjson from './package.json' with {type: 'json'};
// Plugins
const autoprefixer = require('autoprefixer');
const browserSync = require('browser-sync').create();
const concat = require('gulp-concat');
const tildeImporter = require('node-sass-tilde-importer');
const cssnano = require('cssnano');
const imagemin = require('gulp-imagemin');
const pixrem = require('pixrem');
const plumber = require('gulp-plumber');
const postcss = require('gulp-postcss');
import autoprefixer from 'autoprefixer';
import browserSyncLib from 'browser-sync';
import concat from 'gulp-concat';
import tildeImporter from 'node-sass-tilde-importer';
import cssnano from 'cssnano';
import pixrem from 'pixrem';
import plumber from 'gulp-plumber';
import postcss from 'gulp-postcss';
import rename from 'gulp-rename';
import gulpSass from 'gulp-sass';
import * as dartSass from 'sass';
import gulUglifyES from 'gulp-uglify-es';
import { spawn } from 'node:child_process';
const browserSync = browserSyncLib.create();
const reload = browserSync.reload;
const rename = require('gulp-rename');
const sass = require('gulp-sass')(require('sass'));
const spawn = require('child_process').spawn;
const uglify = require('gulp-uglify-es').default;
const sass = gulpSass(dartSass);
const uglify = gulUglifyES.default;
// Relative paths function
function pathsConfig(appName) {
this.app = `./${pjson.name}`;
function pathsConfig() {
const appName = `./${pjson.name}`;
const vendorsRoot = 'node_modules';
return {
@ -32,13 +36,13 @@ function pathsConfig(appName) {
`${vendorsRoot}/@popperjs/core/dist/umd/popper.js`,
`${vendorsRoot}/bootstrap/dist/js/bootstrap.js`,
],
app: this.app,
templates: `${this.app}/templates`,
css: `${this.app}/static/css`,
sass: `${this.app}/static/sass`,
fonts: `${this.app}/static/fonts`,
images: `${this.app}/static/images`,
js: `${this.app}/static/js`,
app: appName,
templates: `${appName}/templates`,
css: `${appName}/static/css`,
sass: `${appName}/static/sass`,
fonts: `${appName}/static/fonts`,
images: `${appName}/static/images`,
js: `${appName}/static/js`,
};
}
@ -95,7 +99,8 @@ function vendorScripts() {
}
// Image compression
function imgCompression() {
async function imgCompression() {
const imagemin = (await import("gulp-imagemin")).default;
return src(`${paths.images}/*`)
.pipe(imagemin()) // Compresses PNG, JPEG, GIF and SVG images
.pipe(dest(paths.images));
@ -163,7 +168,7 @@ function watchPaths() {
}
// Generate all assets
const generateAssets = parallel(styles, scripts, vendorScripts, imgCompression);
const build = parallel(styles, scripts, vendorScripts, imgCompression);
// Set up dev environment
{%- if cookiecutter.use_docker == 'n' %}
@ -176,6 +181,6 @@ const dev = parallel(runServer, initBrowserSync, watchPaths);
const dev = parallel(initBrowserSync, watchPaths);
{%- endif %}
exports.default = series(generateAssets, dev);
exports['generate-assets'] = generateAssets;
exports['dev'] = dev;
task('default', series(build, dev));
task('build', build);
task('dev', dev);

View File

@ -0,0 +1,38 @@
export COMPOSE_FILE := "docker-compose.local.yml"
## Just does not yet manage signals for subprocesses reliably, which can lead to unexpected behavior.
## Exercise caution before expanding its usage in production environments.
## For more information, see https://github.com/casey/just/issues/2473 .
# Default command to list all available commands.
default:
@just --list
# build: Build python image.
build:
@echo "Building python image..."
@docker compose build
# up: Start up containers.
up:
@echo "Starting up containers..."
@docker compose up -d --remove-orphans
# down: Stop containers.
down:
@echo "Stopping containers..."
@docker compose down
# prune: Remove containers and their volumes.
prune *args:
@echo "Killing containers and removing volumes..."
@docker compose down -v {{ "{{args}}" }}
# logs: View container logs
logs *args:
@docker compose logs -f {{ "{{args}}" }}
# manage: Executes `manage.py` command.
manage +args:
@docker compose run --rm django python ./manage.py {{ "{{args}}" }}

View File

@ -1,6 +1,6 @@
# Translations
Start by configuring the `LANGUAGES` settings in `base.py`, by uncommenting languages you are willing to support. Then, translations strings will be placed in this folder when running:
Start by configuring the `LANGUAGES` settings in `base.py`, by uncommenting languages you are willing to support. Then, translation strings will be placed in this folder when running:
```bash
{% if cookiecutter.use_docker == 'y' %}docker compose -f docker-compose.local.yml run --rm django {% endif %}python manage.py makemessages --all --no-location
@ -19,7 +19,7 @@ Once all translations are done, they need to be compiled into `.mo` files (stand
{% if cookiecutter.use_docker == 'y' %}docker compose -f docker-compose.local.yml run --rm django {% endif %}python manage.py compilemessages
```
Note that the `.po` files are NOT used by the application directly, so if the `.mo` files are out of dates, the content won't appear as translated even if the `.po` files are up-to-date.
Note that the `.po` files are NOT used by the application directly, so if the `.mo` files are out of date, the content won't appear as translated even if the `.po` files are up-to-date.
## Production

View File

@ -1,28 +1,22 @@
#!/usr/bin/env python
# ruff: noqa
"""Django's command-line utility for administrative tasks."""
import os
import sys
from pathlib import Path
if __name__ == "__main__":
def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try:
import django
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
raise
except ImportError as exc:
raise ImportError( # noqa: TRY003
"Couldn't import Django. Are you sure it's installed and " # noqa: EM101
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?",
) from exc
# This allows easy placement of apps within the interior
# {{ cookiecutter.project_slug }} directory.
@ -30,3 +24,7 @@ if __name__ == "__main__":
sys.path.append(str(current_path / "{{ cookiecutter.project_slug }}"))
execute_from_command_line(sys.argv)
if __name__ == "__main__":
main()

View File

@ -1,5 +1,3 @@
# ruff: noqa
import os
from collections.abc import Sequence
from pathlib import Path
@ -19,7 +17,7 @@ def merge(
merged_content = ""
for merge_file in files_to_merge:
merged_content += merge_file.read_text()
merged_content += os.linesep
merged_content += "\n"
output_file.write_text(merged_content)

View File

@ -6,15 +6,15 @@
"@babel/preset-env": "^7.16.5",
"@popperjs/core": "^2.10.2",
"autoprefixer": "^10.4.0",
"babel-loader": "^9.1.2",
"babel-loader": "^10.0.0",
"bootstrap": "^5.2.3",
"browser-sync": "^3.0.2",
"css-loader": "^7.1.2",
"gulp-concat": "^2.6.1",
"concurrently": "^9.0.0",
"cssnano": "^7.0.0",
"gulp": "^4.0.2",
"gulp-imagemin": "^7.1.0",
"gulp": "^5.0.0",
"gulp-imagemin": "^9.1.0",
"gulp-plumber": "^1.2.1",
"gulp-postcss": "^10.0.0",
"gulp-rename": "^2.0.0",
@ -26,16 +26,16 @@
"postcss": "^8.3.11",
"postcss-loader": "^8.0.0",
"postcss-preset-env": "^10.0.3",
"sass": "^1.43.4",
"sass": "1.77.6",
"sass-loader": "^16.0.1",
"webpack": "^5.65.0",
"webpack": "^5.82.0",
"webpack-bundle-tracker": "^3.0.1",
"webpack-cli": "^5.0.1",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.0.2",
"webpack-merge": "^6.0.1"
},
"engines": {
"node": "22"
"node": "22.14"
},
"browserslist": [
"last 2 versions"

View File

@ -106,7 +106,7 @@ select = [
"SLOT",
"SIM",
"TID",
"TCH",
"TC",
"INT",
# "ARG", # Unused function argument
"PTH",
@ -135,7 +135,7 @@ ignore = [
# The fixes in extend-unsafe-fixes will require
# provide the `--unsafe-fixes` flag when fixing.
extend-unsafe-fixes = [
"UP038",
"UP038",
]
[tool.ruff.lint.isort]

View File

@ -1,5 +1,5 @@
python-slugify==8.0.4 # https://github.com/un33k/python-slugify
Pillow==10.4.0 # https://github.com/python-pillow/Pillow
Pillow==11.1.0 # pyup: != 11.2.0 # https://github.com/python-pillow/Pillow
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
rcssmin==1.1.2 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
@ -9,42 +9,42 @@ rcssmin==1.1.2 # https://github.com/ndparker/rcssmin
{%- endif %}
argon2-cffi==23.1.0 # https://github.com/hynek/argon2_cffi
{%- if cookiecutter.use_whitenoise == 'y' %}
whitenoise==6.7.0 # https://github.com/evansd/whitenoise
whitenoise==6.9.0 # https://github.com/evansd/whitenoise
{%- endif %}
redis==5.1.0 # https://github.com/redis/redis-py
redis==5.2.1 # https://github.com/redis/redis-py
{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %}
hiredis==3.0.0 # https://github.com/redis/hiredis-py
hiredis==3.1.0 # https://github.com/redis/hiredis-py
{%- endif %}
{%- if cookiecutter.use_celery == "y" %}
celery==5.4.0 # pyup: < 6.0 # https://github.com/celery/celery
celery==5.5.0 # pyup: < 6.0 # https://github.com/celery/celery
django-celery-beat==2.7.0 # https://github.com/celery/django-celery-beat
{%- if cookiecutter.use_docker == 'y' %}
flower==2.0.1 # https://github.com/mher/flower
{%- endif %}
{%- endif %}
{%- if cookiecutter.use_async == 'y' %}
uvicorn[standard]==0.31.0 # https://github.com/encode/uvicorn
uvicorn-worker==0.2.0 # https://github.com/Kludex/uvicorn-worker
uvicorn[standard]==0.34.0 # https://github.com/encode/uvicorn
uvicorn-worker==0.3.0 # https://github.com/Kludex/uvicorn-worker
{%- endif %}
# Django
# ------------------------------------------------------------------------------
django==5.0.9 # pyup: < 5.1 # https://www.djangoproject.com/
django-environ==0.11.2 # https://github.com/joke2k/django-environ
django==5.1.8 # pyup: < 5.2 # https://www.djangoproject.com/
django-environ==0.12.0 # https://github.com/joke2k/django-environ
django-model-utils==5.0.0 # https://github.com/jazzband/django-model-utils
django-allauth[mfa]==65.0.2 # https://github.com/pennersr/django-allauth
django-allauth[mfa]==65.7.0 # https://github.com/pennersr/django-allauth
django-crispy-forms==2.3 # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5==2024.2 # https://github.com/django-crispy-forms/crispy-bootstrap5
crispy-bootstrap5==2025.4 # https://github.com/django-crispy-forms/crispy-bootstrap5
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
django-compressor==4.5.1 # https://github.com/django-compressor/django-compressor
{%- endif %}
django-redis==5.4.0 # https://github.com/jazzband/django-redis
{%- if cookiecutter.use_drf == 'y' %}
# Django REST Framework
djangorestframework==3.15.2 # https://github.com/encode/django-rest-framework
django-cors-headers==4.4.0 # https://github.com/adamchainz/django-cors-headers
djangorestframework==3.16.0 # https://github.com/encode/django-rest-framework
django-cors-headers==4.7.0 # https://github.com/adamchainz/django-cors-headers
# DRF-spectacular for api documentation
drf-spectacular==0.27.2 # https://github.com/tfranzel/drf-spectacular
drf-spectacular==0.28.0 # https://github.com/tfranzel/drf-spectacular
{%- endif %}
{%- if cookiecutter.frontend_pipeline == 'Webpack' %}
django-webpack-loader==3.1.1 # https://github.com/django-webpack/django-webpack-loader

View File

@ -1,44 +1,43 @@
-r production.txt
watchdog==4.0.2 # https://github.com/gorakhargosh/watchdog
Werkzeug[watchdog]==3.0.4 # https://github.com/pallets/werkzeug
Werkzeug[watchdog]==3.1.3 # https://github.com/pallets/werkzeug
ipdb==0.13.13 # https://github.com/gotcha/ipdb
{%- if cookiecutter.use_docker == 'y' %}
psycopg[c]==3.2.2 # https://github.com/psycopg/psycopg
psycopg[c]==3.2.6 # https://github.com/psycopg/psycopg
{%- else %}
psycopg[binary]==3.2.2 # https://github.com/psycopg/psycopg
psycopg[binary]==3.2.6 # https://github.com/psycopg/psycopg
{%- endif %}
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
watchfiles==0.24.0 # https://github.com/samuelcolvin/watchfiles
watchfiles==1.0.4 # https://github.com/samuelcolvin/watchfiles
{%- endif %}
# Testing
# ------------------------------------------------------------------------------
mypy==1.11.2 # https://github.com/python/mypy
django-stubs[compatible-mypy]==5.1.0 # https://github.com/typeddjango/django-stubs
pytest==8.3.3 # https://github.com/pytest-dev/pytest
pytest-sugar==1.0.0 # https://github.com/Frozenball/pytest-sugar
mypy==1.15.0 # https://github.com/python/mypy
django-stubs[compatible-mypy]==5.1.3 # https://github.com/typeddjango/django-stubs
pytest==8.3.5 # https://github.com/pytest-dev/pytest
pytest-sugar==1.0.0 # https://github.com/Teemu/pytest-sugar
{%- if cookiecutter.use_drf == "y" %}
djangorestframework-stubs==3.15.1 # https://github.com/typeddjango/djangorestframework-stubs
djangorestframework-stubs==3.15.3 # https://github.com/typeddjango/djangorestframework-stubs
{%- endif %}
# Documentation
# ------------------------------------------------------------------------------
sphinx==7.4.7 # https://github.com/sphinx-doc/sphinx
sphinx-autobuild==2024.9.19 # https://github.com/GaretJax/sphinx-autobuild
sphinx==8.2.3 # pyup: != 8.3.0 # https://github.com/sphinx-doc/sphinx
sphinx-autobuild==2024.10.3 # https://github.com/GaretJax/sphinx-autobuild
# Code quality
# ------------------------------------------------------------------------------
ruff==0.6.8 # https://github.com/astral-sh/ruff
coverage==7.6.1 # https://github.com/nedbat/coveragepy
djlint==1.35.2 # https://github.com/Riverside-Healthcare/djLint
pre-commit==3.8.0 # https://github.com/pre-commit/pre-commit
ruff==0.11.4 # https://github.com/astral-sh/ruff
coverage==7.8.0 # https://github.com/nedbat/coveragepy
djlint==1.36.4 # https://github.com/Riverside-Healthcare/djLint
pre-commit==4.2.0 # https://github.com/pre-commit/pre-commit
# Django
# ------------------------------------------------------------------------------
factory-boy==3.3.1 # https://github.com/FactoryBoy/factory_boy
factory-boy==3.3.2 # https://github.com/FactoryBoy/factory_boy
django-debug-toolbar==4.4.6 # https://github.com/jazzband/django-debug-toolbar
django-debug-toolbar==5.1.0 # https://github.com/jazzband/django-debug-toolbar
django-extensions==3.2.3 # https://github.com/django-extensions/django-extensions
django-coverage-plugin==3.1.0 # https://github.com/nedbat/django_coverage_plugin
pytest-django==4.9.0 # https://github.com/pytest-dev/pytest-django
pytest-django==4.11.1 # https://github.com/pytest-dev/pytest-django

View File

@ -3,42 +3,42 @@
-r base.txt
gunicorn==23.0.0 # https://github.com/benoitc/gunicorn
psycopg[c]==3.2.2 # https://github.com/psycopg/psycopg
{%- if cookiecutter.use_whitenoise == 'n' %}
Collectfasta==3.2.0 # https://github.com/jasongi/collectfasta
psycopg[c]==3.2.6 # https://github.com/psycopg/psycopg
{%- if cookiecutter.use_whitenoise == 'n'and cookiecutter.cloud_provider in ('AWS', 'GCP') %}
Collectfasta==3.2.1 # https://github.com/jasongi/collectfasta
{%- endif %}
{%- if cookiecutter.use_sentry == "y" %}
sentry-sdk==2.14.0 # https://github.com/getsentry/sentry-python
sentry-sdk==2.25.1 # https://github.com/getsentry/sentry-python
{%- endif %}
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
hiredis==3.0.0 # https://github.com/redis/hiredis-py
hiredis==3.1.0 # https://github.com/redis/hiredis-py
{%- endif %}
# Django
# ------------------------------------------------------------------------------
{%- if cookiecutter.cloud_provider == 'AWS' %}
django-storages[s3]==1.14.4 # https://github.com/jschneier/django-storages
django-storages[s3]==1.14.6 # https://github.com/jschneier/django-storages
{%- elif cookiecutter.cloud_provider == 'GCP' %}
django-storages[google]==1.14.4 # https://github.com/jschneier/django-storages
django-storages[google]==1.14.6 # https://github.com/jschneier/django-storages
{%- elif cookiecutter.cloud_provider == 'Azure' %}
django-storages[azure]==1.14.4 # https://github.com/jschneier/django-storages
django-storages[azure]==1.14.6 # https://github.com/jschneier/django-storages
{%- endif %}
{%- if cookiecutter.mail_service == 'Mailgun' %}
django-anymail[mailgun]==12.0 # https://github.com/anymail/django-anymail
django-anymail[mailgun]==13.0 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Amazon SES' %}
django-anymail[amazon-ses]==12.0 # https://github.com/anymail/django-anymail
django-anymail[amazon-ses]==13.0 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Mailjet' %}
django-anymail[mailjet]==12.0 # https://github.com/anymail/django-anymail
django-anymail[mailjet]==13.0 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Mandrill' %}
django-anymail[mandrill]==12.0 # https://github.com/anymail/django-anymail
django-anymail[mandrill]==13.0 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Postmark' %}
django-anymail[postmark]==12.0 # https://github.com/anymail/django-anymail
django-anymail[postmark]==13.0 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Sendgrid' %}
django-anymail[sendgrid]==12.0 # https://github.com/anymail/django-anymail
django-anymail[sendgrid]==13.0 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Brevo' %}
django-anymail[brevo]==12.0 # https://github.com/anymail/django-anymail
django-anymail[brevo]==13.0 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'SparkPost' %}
django-anymail[sparkpost]==12.0 # https://github.com/anymail/django-anymail
django-anymail[sparkpost]==13.0 # https://github.com/anymail/django-anymail
{%- elif cookiecutter.mail_service == 'Other SMTP' %}
django-anymail==12.0 # https://github.com/anymail/django-anymail
django-anymail==13.0 # https://github.com/anymail/django-anymail
{%- endif %}

View File

@ -1 +0,0 @@
python-3.12.6

View File

@ -0,0 +1,23 @@
##basic build dependencies of various Django apps for Debian Bookworm 12.x
#build-essential metapackage install: make, gcc, g++,
build-essential
#required to translate
gettext
python3-dev
##shared dependencies of:
##Pillow, pylibmc
zlib1g-dev
##Postgresql and psycopg dependencies
libpq-dev
##Pillow dependencies
libtiff5-dev
libjpeg62-turbo-dev
libfreetype6-dev
liblcms2-dev
libwebp-dev
##django-extensions
libgraphviz-dev

View File

@ -1,5 +1,5 @@
"""
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
https://cookiecutter-django.readthedocs.io/en/latest/5-help/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""

View File

@ -1,5 +1,5 @@
"""
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
https://cookiecutter-django.readthedocs.io/en/latest/5-help/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""

View File

@ -1,7 +1,7 @@
"""
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
https://cookiecutter-django.readthedocs.io/en/latest/5-help/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
from django.conf import settings
from django.db import migrations

View File

@ -1,5 +1,5 @@
"""
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
https://cookiecutter-django.readthedocs.io/en/latest/5-help/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""

View File

@ -17,7 +17,7 @@ class UserAdminChangeForm(admin_forms.UserChangeForm):
{%- endif %}
class UserAdminCreationForm(admin_forms.UserCreationForm):
class UserAdminCreationForm(admin_forms.AdminUserCreationForm): # type: ignore[name-defined] # django-stubs is missing the class, thats why the error is thrown: typeddjango/django-stubs#2555
"""
Form for User Creation in the Admin Area.
To change user signup, see UserSignupForm and UserSocialSignupForm.

View File

@ -4,14 +4,14 @@ import pytest
from django.urls import reverse
def test_swagger_accessible_by_admin(admin_client):
def test_api_docs_accessible_by_admin(admin_client):
url = reverse("api-docs")
response = admin_client.get(url)
assert response.status_code == HTTPStatus.OK
@pytest.mark.django_db
def test_swagger_ui_not_accessible_by_normal_user(client):
def test_api_docs_not_accessible_by_anonymous_users(client):
url = reverse("api-docs")
response = client.get(url)
assert response.status_code == HTTPStatus.FORBIDDEN

Some files were not shown because too many files have changed in this diff Show More