Skip to content
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

Doesn't work with ManifestStaticFilesStorage #8

Closed
knyghty opened this issue Jul 24, 2016 · 6 comments
Closed

Doesn't work with ManifestStaticFilesStorage #8

knyghty opened this issue Jul 24, 2016 · 6 comments

Comments

@knyghty
Copy link

knyghty commented Jul 24, 2016

Didn't test any other storage backends.

Would be nice if this was supported, but if it's not going to happen it would also be nice to document that it doesn't work, and perhaps suggest an alternative.

@beaugunderson
Copy link
Owner

will look at what it takes to support this; if you beat me to it I'd also to be happy to merge a PR :)


Sent from my phone.

On Jul 24, 2016, at 11:46, Tom Carrick [email protected] wrote:

Didn't test any other storage backends.

Would be nice if this was supported, but if it's not going to happen it would also be nice to document that it doesn't work, and perhaps suggest an alternative.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@knyghty
Copy link
Author

knyghty commented Jul 24, 2016

I don't now much about Gulp (we were already using it when I joined), but I can give you a bit of a (not very closely investigated) lead at least.

Seems that collectstatic correctly creates the manifest file and creates the files with the hashed filenames.

Where it seems to fail is that in templates, something appears to be rewriting the static URLs (I didn't look into this much), adding things like integrity attributes, and this (I guess) is overriding {% static %}'s behaviour and not using the files with hashes.

@beaugunderson
Copy link
Owner

hmm, weird! what other Django modules are you using in your INSTALLED_APPS?

fwiw I use this in production and it does work with django-gulp:

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'

@beaugunderson
Copy link
Owner

looked at the Django source and don't see integrity attributes anywhere there...

@beaugunderson
Copy link
Owner

I switched my local instance to django.contrib.staticfiles.storage.ManifestStaticFilesStorage, ran collectstatic, and everything still worked--some additional information about your app would help in diagnosing this :)

@knyghty
Copy link
Author

knyghty commented Aug 28, 2016

I'm going to assume it's something weird we're doing then and close this unless I can find something more useful to go on

@knyghty knyghty closed this as completed Aug 28, 2016
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

No branches or pull requests

2 participants