1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-07-03 18:15:42 +00:00

add white noise for static_root/staticfiles_dir problem for debug/non-debug running mode

This commit is contained in:
catborise 2023-11-10 16:29:48 +03:00
parent 7171a70f75
commit e324a19401
214 changed files with 15499 additions and 51 deletions

View file

@ -1,7 +1,7 @@
"""
Django dev settings for webvirtcloud project.
HowTo: python3 manage.py runserver 0:8000 --settings=webvirtcloud.settings-dev
HowTo: python3 manage.py runserver 0:8000 --settings=webvirtcloud.settings-dev --nostatic
"""
@ -41,4 +41,4 @@ DEBUG_TOOLBAR_PANELS = [
'debug_toolbar.panels.redirects.RedirectsPanel',
'debug_toolbar.panels.profiling.ProfilingPanel',
'template_profiler_panel.panels.template.TemplateProfilerPanel',
]
]

View file

@ -48,6 +48,7 @@ INSTALLED_APPS = [
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.common.CommonMiddleware",
@ -122,12 +123,7 @@ USE_TZ = True
STATIC_URL = "/static/"
if not DEBUG:
STATIC_ROOT = ""
STATICFILES_DIRS = [
Path.joinpath(BASE_DIR, "static"),
]
STATIC_ROOT = Path.joinpath(BASE_DIR, "static")
BS_ICONS_CACHE = Path.joinpath(BASE_DIR, 'static/icon_cache')