Skip to content

Silence a dev-only Django staticfiles warning #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 21, 2024

Conversation

davidfischer
Copy link
Member

Django emits a warning when running tests if STATIC_ROOT doesn't exist. That directory is normally only created after running collectstatic. This would be a serious error in prod, but isn't a big deal in dev.

Regardless, it's easy to silence the warning by creating an empty directory.

Django emits a warning when running tests if `STATIC_ROOT`
doesn't exist. That directory is normally only created after
running `collectstatic`. This would be a serious error in prod,
but isn't a big deal in dev.

Regardless, it's easy to silence the warning by creating
an empty directory.
This only occurs when Django debug toolbar is enabled.
@davidfischer davidfischer requested a review from a team May 21, 2024 15:28
@davidfischer davidfischer merged commit f233681 into main May 21, 2024
1 check passed
@davidfischer davidfischer deleted the davidfischer/django-staticfiles-warning branch May 21, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant