From 350ef84ac1691783cc35f48d90b49d802ba046ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartolom=C3=A9=20S=C3=A1nchez=20Salado?= Date: Sun, 17 Dec 2023 09:19:55 +0100 Subject: [PATCH 1/2] Upgrade and clarify Django quickstart docs --- docs/index.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 09582507..c1b09ad4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -60,14 +60,19 @@ list, above all other middleware apart from Django's `SecurityMiddleware That's it, you're ready to go. -Want forever-cacheable files and compression support? Just add this to your +Want forever-cacheable files and compression support? On Django 4.2+, just add this to your ``settings.py``: .. code-block:: python - STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" + STORAGES = { + # ... + "staticfiles": { + "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage", + }, + } -For more details, including on setting up +For older Django versions and more details, including on setting up CloudFront and other CDNs see the :doc:`Using WhiteNoise with Django ` guide. From 9cd4d86efa6eb17edfa8741e4a65b1566ad28f53 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 28 Oct 2024 11:18:23 +0000 Subject: [PATCH 2/2] Remove django version notes --- docs/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index c1b09ad4..336633d2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -60,8 +60,8 @@ list, above all other middleware apart from Django's `SecurityMiddleware That's it, you're ready to go. -Want forever-cacheable files and compression support? On Django 4.2+, just add this to your -``settings.py``: +Want forever-cacheable files and compression support? Just add this to your +settings file: .. code-block:: python @@ -72,7 +72,7 @@ Want forever-cacheable files and compression support? On Django 4.2+, just add t }, } -For older Django versions and more details, including on setting up +For more details, including on setting up CloudFront and other CDNs see the :doc:`Using WhiteNoise with Django ` guide.