Fixes #2160 -- Corrected links to static files#2162
Merged
matthiask merged 2 commits intodjango-commons:mainfrom Jul 22, 2025
Merged
Fixes #2160 -- Corrected links to static files#2162matthiask merged 2 commits intodjango-commons:mainfrom
matthiask merged 2 commits intodjango-commons:mainfrom
Conversation
The JSON serialization used by the new serializable mechanism compressed the `StaticFile` dataclass down to a single string without an `.url` attribute. Change the code to use a tuple instead to avoid this problem.
tim-schilling
approved these changes
Jul 22, 2025
Member
tim-schilling
left a comment
There was a problem hiding this comment.
Thanks for cleaning this up!
awdem
added a commit
to DemocracyClub/WhoCanIVoteFor
that referenced
this pull request
Oct 13, 2025
django-debug-toolbar 6.0.0 changed how it collects static file links (django-commons/django-debug-toolbar#2162) for the staticfiles panel so that it uses django's staticfile finders. These finders consider paths with leading slashes as unsafe so they won't load them. The leading slashes are a bug anyway, because they're redundant so I've removed them.
awdem
added a commit
to DemocracyClub/WhoCanIVoteFor
that referenced
this pull request
Oct 13, 2025
django-debug-toolbar 6.0.0 changed how it collects static file links (django-commons/django-debug-toolbar#2162) for the staticfiles panel so that it uses django's staticfile finders. These finders consider paths with leading slashes as unsafe so they won't load them. The leading slashes are a bug anyway, because they're redundant so I've removed them.
awdem
added a commit
to DemocracyClub/WhoCanIVoteFor
that referenced
this pull request
Oct 14, 2025
django-debug-toolbar 6.0.0 changed how it collects static file links (django-commons/django-debug-toolbar#2162) for the staticfiles panel so that it uses django's staticfile finders. These finders consider paths with leading slashes as unsafe so they won't load them. The leading slashes are a bug anyway, because they're redundant so I've removed them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The JSON serialization used by the new serializable mechanism compressed the
StaticFiledataclass down to a single string without an.urlattribute. Change the code to use a tuple instead to avoid this problem.Fixes #2160
Checklist:
docs/changes.rst.