Rework Static_Root & StaticFile structure - #623
Conversation
catborise
commented
Nov 10, 2023
changing static files structure is not appropriate, because there will be to two copy of static files. one of them static/, other one webvirtcloud/webvirtcloud/static. |
MisterBlueBear
commented
Nov 11, 2023
@catborise I was just following the django 4.2 docs for STATIC_ROOT which says :
|
These changes fix the
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem pathas seen in #622 and #605.Static files in the
staticdirectory are moved towebvirtcloud/staticand framework component files (i.e.rest_framework/*anddrf-yasg/*) are deleted as they will be copied / linked bycollectstatic.Also, instead of copying static files into the static directory, I think using symbolic links (--link) will be better as it uses less disk space and the
--clearremoves orphan static files which may no longer be part of a framework component or the WVC static directory.Note: When updating WVC, the below code in
webvirtcloud/settings.pymust be replaced with
The
webvirtcloud/settings.py.templateis up-to-date with the changes so a new installation will work out-of-the-box.I commented and posted additionnal explanations for these changes at #605 (comment)