diff --git a/takahe/settings.py b/takahe/settings.py index ff50e18..3aed739 100644 --- a/takahe/settings.py +++ b/takahe/settings.py @@ -303,7 +303,11 @@ STATICFILES_FINDERS = [ STATICFILES_DIRS = [BASE_DIR / "static"] -STATICFILES_STORAGE = "django.contrib.staticfiles.storage.ManifestStaticFilesStorage" +STORAGES = { + "staticfiles": { + "BACKEND": "django.contrib.staticfiles.storage.ManifestStaticFilesStorage" + }, +} SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies" diff --git a/tests/conftest.py b/tests/conftest.py index e1e25a2..d96c79e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -58,9 +58,13 @@ kwIDAQAB @pytest.fixture(autouse=True) def _test_settings(settings): - settings.STATICFILES_STORAGE = ( - "django.contrib.staticfiles.storage.StaticFilesStorage" - ) + # We use `StaticFilesStorage` instead of `ManifestStaticFilesStorage` in tests + # since want stable filenames (`css/styles.css`) instead of hashed (`css/styles.55e7cbb9ba48.css`) + settings.STORAGES = { + "staticfiles": { + "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage" + }, + } settings.SETUP.MAIN_DOMAIN = "example.com" settings.MAIN_DOMAIN = "example.com"