Do not set STATICFILES_STORAGE in test settings on Django >= 4.2

stable/5.2.x
Sage Abdullah 2023-11-06 10:48:40 +00:00 zatwierdzone przez Matt Westcott
rodzic fea0cde8e5
commit d398c3f382
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -1,5 +1,6 @@
import os
from django import VERSION as DJANGO_VERSION
from django.contrib.messages import constants as message_constants
from django.utils.translation import gettext_lazy as _
@ -70,10 +71,10 @@ if os.environ.get("STATICFILES_STORAGE", "") == "manifest":
"BACKEND"
] = "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
# DJANGO_VERSION < 4.2
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
)
if DJANGO_VERSION < (4, 2):
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
)
USE_TZ = not os.environ.get("DISABLE_TIMEZONE")