WHITENOISE_USE_FINDERS to avoid collectstatic

This commit is contained in:
Klaas van Schelven
2024-07-26 15:28:33 +02:00
parent b76e474ef1
commit 8cee902db4
+12 -1
View File
@@ -186,7 +186,18 @@ STATIC_URL = 'static/'
STATICFILES_DIRS = [
BASE_DIR / "static",
]
STATIC_ROOT = BASE_DIR / "collectedstatic"
# > Instead of only picking up files collected into STATIC_ROOT, find and serve files in their original directories
# > using Djangos “finders” API. [..] Its also possible to use this setting in production, avoiding the need to run
# > the collectstatic command during the build, so long as you do not wish to use any of the caching and compression
# > features provided by the storage backends.
#
# Reasons to enable this in production:
#
# * Simplicity-as-a-core-value: yet another step we can remove from the install/upgrade process
# * We don't use the mentioned features (caching, compression)
# * The performance-impact of this setting only hits the GUI, which is the least performance-sensitive part anyway
WHITENOISE_USE_FINDERS = True
# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field