Comments (12)
AWSOME!!!
I've worked on this a bit more and just merged it with the develop branch. Thank you!
from django-compressor.
I've also worked on tests a bit, see the results here: http://dpaste.de/UI8t/ \o/
from django-compressor.
Cool :)
I noticed that you removed the COMPRESS_OFFLINE setting. In my use-case I wanted to make aboslutely sure that no compression occurs "online" (i.e. I'd rather have the users download the uncompressed files than to spend processing time on compression). How do you feel about this?
from django-compressor.
Nah, no worries, I've actually re-added it here: e4fba59
from django-compressor.
I need to compress offline generating both the minified and a gzipped version.
cache/css/66c5c8dd8334.css
cache/css/66c5c8dd8334.gz
cache/js/05ca8f5045b6.js
cache/js/05ca8f5045b6.js.gz
The idea is also to save processing, by manually gzipping at compress time, instead of turning it on in nginx. I'd be happy to work on it if this a feature that may be desired in django_compressor. Thoughts?
./manage.py compress --gzip
http://developer.yahoo.com/performance/rules.html
from django-compressor.
This isn't different to any other compressing, so you can use an own storage backend to gzip the results. In fact the tests actually contain a working example: https://github.com/jezdez/django_compressor/blob/master/compressor/tests/storage.py No idea if this should be blessed and put directly in the compressor.storage module. What do you think?
from django-compressor.
I didn't get to reading into a custom storage backend, maybe that is the right approach for this app.
I don't have a strong opinion on if it needs to be in the options by default, though gzipping is a best practice, I think most people turn in on in their webserver. Maybe this is an edge case for high traffic sites.
from django-compressor.
Well, let's move the storage backend from the tests module to the compressor.storage
module so you'll be able to set COMPRESS_STORAGE_BACKEND = 'compressor.storage.GzipCompressorFileStorage'
from django-compressor.
Ok, moved the storage backend in bcf1efe
from django-compressor.
Nice, works perfect. Though it is COMPRESS_STORAGE not COMPRESS_STORAGE_BACKEND
from django-compressor.
Just read the default compression level of the gzip library is 9 (slowest but best compression). Awesome, because the bash tool defaults to 6.
from django-compressor.
Awesome :)
from django-compressor.
Related Issues (20)
- Please update readthedocs with release 4.2 and 4.3 HOT 4
- Slim down package HOT 1
- Add support for django 4.2 HOT 1
- Replace deprecated imp module with importlib HOT 2
- Django's `get_storage_class` is deprecated in 4.2 (Django 5.1 compat.) HOT 5
- Releasing a new version with Django 4.2 support HOT 3
- No way to specify hashing method for JS files? HOT 1
- Disable offline compression for some scripts HOT 5
- Fix tests with Python 3.9.17, 3.10.12 and 3.11.4 HOT 7
- Dependencies are pinned HOT 1
- Dynamic SCRIPT_NAME and compressed assets HOT 8
- Getting more info when `Error parsing template` happens
- Not compatible with django-components HOT 10
- Issue with losing templates in compress command in version >=3.0.
- optional max_workers for compress command HOT 1
- 'Settings' object has no attribute 'COMPRESSORS' HOT 8
- OSSFuzz Integration HOT 4
- 4.4: compressor.exceptions.OfflineGenerationError raised in tests HOT 4
- Django 5.1 compatibility HOT 1
- Offline compression + inlining bug HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-compressor.