-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementImprovements or additions to existing featuresImprovements or additions to existing features
Description
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, 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
collectstaticand 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.staticfilesAppConfig 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
srcduring development. - Consider a small management command
manage.py staticfiles-checkto show which files would be collected given current ignore rules.
Minimal Migration Plan / Tests
- Add conditional logic in
TaccStaticFilesConfigto readTACCSITE_STATICFILES_IGNORE_PATTERNSand only register ignores when set. - Tests: run
collectstatic --no-inputin a test environment and assert files fromstatic/.../srcare present when ignore patterns are unset; assert they are absent when set.
Metadata
Metadata
Assignees
Labels
enhancementImprovements or additions to existing featuresImprovements or additions to existing features