Summary
A custom staticfiles AppConfig (TaccStaticFilesConfig) and global ignore patterns cause source assets (for example, files under */src/*.css) to be excluded from Django's staticfiles processing. This breaks local debugging, collectstatic expectations, and can silently hide files.
Files / Locations
taccsite_cms/django/contrib/staticfiles_custom/apps.py (custom AppConfig and ignore patterns)
taccsite_cms/settings.py (STATICFILES settings reference / usage)
Problems / Impact
collectstatic and dev servers may not expose source files; developers cannot debug or reference source CSS/JS.
- Unexpected missing files in different environments (dev vs prod).
- Makes contributor onboarding harder because the source/build split is enforced silently.
Proposed (Backward-Compatible) Approach
- Prefer the standard
django.contrib.staticfiles AppConfig by default.
- If custom ignore patterns are desired, make them configurable via a setting (e.g.,
TACCSITE_STATICFILES_IGNORE_PATTERNS = [...]). If the setting is absent, do not apply any ignore rules.
- Add startup warning when ignore patterns are enabled, and document how to include
src during development.
- Consider a small management command
manage.py staticfiles-check to show which files would be collected given current ignore rules.
Minimal Migration Plan / Tests
- Add conditional logic in
TaccStaticFilesConfig to read TACCSITE_STATICFILES_IGNORE_PATTERNS and only register ignores when set.
- Tests: run
collectstatic --no-input in a test environment and assert files from static/.../src are present when ignore patterns are unset; assert they are absent when set.
Note
Generated by AI. Edited by @wesleyboar.
Summary
A custom staticfiles AppConfig (
TaccStaticFilesConfig) and global ignore patterns cause source assets (for example, files under*/src/*.css) to be excluded from Django's staticfiles processing. This breaks local debugging,collectstaticexpectations, and can silently hide files.Files / Locations
taccsite_cms/django/contrib/staticfiles_custom/apps.py(custom AppConfig and ignore patterns)taccsite_cms/settings.py(STATICFILES settings reference / usage)Problems / Impact
collectstaticand dev servers may not expose source files; developers cannot debug or reference source CSS/JS.Proposed (Backward-Compatible) Approach
django.contrib.staticfilesAppConfig by default.TACCSITE_STATICFILES_IGNORE_PATTERNS = [...]). If the setting is absent, do not apply any ignore rules.srcduring development.manage.py staticfiles-checkto show which files would be collected given current ignore rules.Minimal Migration Plan / Tests
TaccStaticFilesConfigto readTACCSITE_STATICFILES_IGNORE_PATTERNSand only register ignores when set.collectstatic --no-inputin a test environment and assert files fromstatic/.../srcare present when ignore patterns are unset; assert they are absent when set.