From ae080c42c24234a3cdd3b41f41f60568823e64c5 Mon Sep 17 00:00:00 2001 From: Michael Kelly Date: Fri, 26 Feb 2016 14:04:12 -0800 Subject: [PATCH] Use consistent STATICFILES_STORAGE across environments. collectstatic only adds hashes to static file filenames when STATICFILES_STORAGE is set correctly. We want the Dockerfile and other things to have the hashed filenames, but the Dockerfile runs collectstatic under the Development environment. Also, there's no problem using the manifest storage during development. So we move the setting. --- .gitignore | 1 + normandy/settings.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9d8ea161..9ae94cbf 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ _build /.cache/ /etc/ssl /__version__/ +/tmp diff --git a/normandy/settings.py b/normandy/settings.py index 5668fa33..78f1c53d 100644 --- a/normandy/settings.py +++ b/normandy/settings.py @@ -84,6 +84,7 @@ class Base(Core): ALLOWED_HOSTS = values.ListValue([]) DATABASES = values.DatabaseURLValue('postgres://postgres@localhost/normandy') ADMINS = values.SingleNestedListValue([]) + STATICFILES_STORAGE = values.Value('whitenoise.django.GzipManifestStaticFilesStorage') EMAIL_HOST_USER = values.Value() EMAIL_HOST = values.Value() @@ -146,7 +147,6 @@ class Development(Base): class Production(Base): """Settings for the production environment.""" - STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' class Test(Base):