-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
No compression happening #483
Comments
You have to explicitly use the |
Thank you Timothee, this is very helpful, I did miss this. However even after making this change, and running collectstatic I still
On Tue, Jul 28, 2015 at 11:08 AM, Timothée Peignier <
|
I'm afraid the mixins order is important here, try to put |
Thanks Timothee for the support. After reordering the mixins, it's On Tue, Jul 28, 2015 at 11:29 AM, Timothée Peignier <
|
Is this the issue?
|
Yes, that's the issue here. |
Closing this issue, of which is basically a duplicate of:
See also my StackOverflow question which I answered as best I could with fragments from these conversations. @cyberdelia your prompt responses were very appreciated. Also you may save yourself some time if you add a bit more to the README in the relevant sections. 1) It sounds like "compression" is on by default, so it wasn't clear to me that I needed the special gzip support enabled. Even though I tried to read it all I somehow missed it. A comment near the front might help. 2) That GZipMixin has to go first, and on the issues of rewriting URLs. 3) Perhaps a tips or troubleshooting section. I hope my SO issue will defray some future questions, although I feel that my approach is a bit of a hack and perhaps still not complete. Also I'm not clear yet on the relationship of using AWS_IS_GZIPPED to the solution I've implemented. |
@jplehmann Feel free to propose a PR to improve the documentation. I should probably go ahead and merge my gzip-url branch, since it sounds like most people expect that behavior. |
Can you explain how that's an "and" and not an "or"? And, can you provide any examples or links on how to do this? (change pipeline template tags to conditionally provide gz links based on headers?) It seems like it's pretty important to support that scenario. |
I think part of the confusion for the uninitiated, is that "compression" on by default really means minification, not gzipping. On the topic of compression, I got burned this morning by Yuglify's inability to handle a bang in the javadoc comment. Basically it fails to compress and produces malformed Javascript. Seems like a huge bug and maybe Yuglify isn't the best default/recommended compressor. But for me only happens when using terminal input the way Pipeline uses it. |
I'm using django-pipeline with s3. I'm successfully using collectstatic to combined my Javascript files and store them in my s3 bucket, but they are not getting compressed for some reason (verified by looking at the file, its size, and its content-encoding). Otherwise things are working correctly with the combined scripts.js that is produced.
Here are the changes I made to use django-pipeline:
More detail:
As mentioned, collectstatic does produce scripts.js just not compressed. The output of that command includes:
I'm using Django 1.8, django-pipeline 1.5.2, and django-storages 1.1.8.
Probably this is something dumb I'm doing, but possibly a bug or missing documentation. IF I have compression enabled, I'd expect an error at least.
The text was updated successfully, but these errors were encountered: