From 1cb2a0c98e3d54b4f2e89426e678f73713be94b6 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Thu, 13 Aug 2020 10:13:40 -0400 Subject: [PATCH] Set COMPRESS_ROOT to STATIC_ROOT for compressor Django compressor also recommends the `COMPRESS_ROOT` be the STATIC_ROOT. This also makes sure the utils is set up properly so that the CACHE directory is actually publicly available (it'll be inside the static directory as a subdirectory). --- {{cookiecutter.project_slug}}/config/settings/production.py | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index ce381715c..f64ad1d27 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -242,6 +242,7 @@ COMPRESS_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" COMPRESS_STORAGE = "storages.backends.gcloud.GoogleCloudStorage" {%- elif cookiecutter.cloud_provider == 'AWS' or cookiecutter.cloud_provider == 'GCP' %} COMPRESS_STORAGE = STATICFILES_STORAGE +COMPRESS_ROOT = STATIC_ROOT {%- elif cookiecutter.cloud_provider == 'None' %} COMPRESS_STORAGE = "compressor.storage.GzipCompressorFileStorage" {%- endif %}