Try to fix css broken issue

This commit is contained in:
2026-03-21 22:39:00 +11:00
parent 2e47fd1046
commit a8ff146e95
2 changed files with 4 additions and 1 deletions
+4 -1
View File
@@ -25,8 +25,12 @@ INSTALLED_APPS = [
ROOT_URLCONF = 'core.urls'
# Why WhiteNoise failed: WhiteNoiseMiddleware was at the bottom of MIDDLEWARE (position 8). WhiteNoise requires being right after SecurityMiddleware (position 2) so
# it can intercept /static/* requests before other middleware processes them. When it was last, the requests were falling through to Django URL routing, which
# returned HTML 404 pages.
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'core.middleware.CustomLocaleMiddleware', # 替换原来的 LocaleMiddleware
'django.middleware.common.CommonMiddleware',
@@ -34,7 +38,6 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
]
TEMPLATES = [
BIN
View File
Binary file not shown.