Skip to content

Conversation

apollo13
Copy link
Member

I ran into this with patternfly, which sets up URLs like this:
--pf-c-background-image--Filter: url("#image_overlay");

When using this together with whitenoise &
WHITENOISE_KEEP_ONLY_HASHED_FILES, whitenoise tries to remove the
STATIC_ROOT. This is arguably a bug in whitenoise, but there is no point
in doing post processing for files without an url_path.

I have no idea how to test this :/ @felixxm any ideas?

@felixxm felixxm changed the title Ignore URLs without a path in staticfiles post processing. Made HashedFilesMixin ignore the URLs without a path. Jun 23, 2022
@felixxm felixxm force-pushed the empty_url_path branch 2 times, most recently from 69d407a to 0e80b1d Compare June 23, 2022 06:57
@felixxm
Copy link
Member

felixxm commented Jun 23, 2022

@apollo13 Thanks 👍 I added a test.

@felixxm felixxm changed the title Made HashedFilesMixin ignore the URLs without a path. Made HashedFilesMixin ignore URLs without a path. Jun 23, 2022
@felixxm felixxm merged commit e6f36ea into django:main Jun 23, 2022
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.

2 participants