1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 17:06:09 +00:00

chore(static): nginx alone serves the static files; WhiteNoise is removed

nginx answers /static/ from staticfiles/ before a request reaches gunicorn,
so WhiteNoise never served a file in an installed panel. It only answered
under runserver with DEBUG off, from staticfiles/ as the last collectstatic
left it: a stale copy without the themes broke the page. The dev server
serves the sources itself with DEBUG on, or with --insecure, which the
README now says.
This commit is contained in:
catborise 2026-11-09 08:16:30 +03:00
parent 04f39d469c
commit aead17dc32
4 changed files with 3 additions and 5 deletions

View file

@ -90,7 +90,6 @@ MIDDLEWARE = [
"webvirtcloud.middleware.RequestIdMiddleware",
"webvirtcloud.middleware.AccessDeniedMiddleware",
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.common.CommonMiddleware",
@ -230,7 +229,7 @@ USE_TZ = True
STATIC_URL = "/static/"
# Source assets live in static/; collectstatic gathers them with the apps'
# assets into staticfiles/ (gitignored), which WhiteNoise and nginx serve.
# assets into staticfiles/ (gitignored), which nginx serves.
STATICFILES_DIRS = [BASE_DIR / "static"]
STATIC_ROOT = BASE_DIR / "staticfiles"