computed_settings: Set STATICFILES_DIRS to an existing absolute path.

Django has always expected this, but Django 4.0 added a system check
that spews warnings in production.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-08-26 13:20:47 -07:00
committed by Tim Abbott
parent 0612c29b02
commit 81d0f5bdd9
2 changed files with 3 additions and 1 deletions

View File

@@ -607,7 +607,8 @@ LOCALE_PATHS = (os.path.join(DEPLOY_ROOT, "locale"),)
# We want all temporary uploaded files to be stored on disk.
FILE_UPLOAD_MAX_MEMORY_SIZE = 0
STATICFILES_DIRS = ["static/"]
if DEVELOPMENT or "ZULIP_COLLECTING_STATIC" in os.environ:
STATICFILES_DIRS = [os.path.join(DEPLOY_ROOT, "static")]
if DEBUG:
WEBPACK_BUNDLES = "../webpack/"