(c) Peter Bengtsson, <mail@peterbe.com>, 2012 License: MIT
For elitists (e.g. me) who use [jingo](https://github.com/jbalogh/jingo) to connect jinja2 with Django a major drawback is that you can’t do offline compression if you use [django_compressor](https://github.com/jezdez/django_compressor).
The compress command that comes with django_compressor only works for regular Django templates. :( Note though, that you can happily use jingo with django_compressor but it only works its magic during runtime. This package aims to solve that with a new command called compress_jingo.
To install
First install it by:
` pip install django-jingo-offline-compressor `
To start with, this assumes that you have django_compressor and jingo set up and working.
Add jingo_offline_compressor to your INSTALLED_APPS.
To run
Just like you’d run regular django_compressor you now run:
` ./manage.py compress_jingo `
And remember, unless you have COMPRESS_OFFLINE = True in your settings you might have to do:
` ./manage.py compress_jingo --force `
That should now have created all the minified and concatenated files in your STATIC_ROOT in a sub-directory called CACHE.
Note: If you have other apps in INSTALLED_APPS that have been added to JINGO_EXCLUDE_APPS some of their templates might actually be included in warnings when you run compress_jingo. Just ignore at will.
What’s next
It’s early days but hopefully if this stabilize and prove its existence. Hopefully it can lead to a decent refactor and to have tests so it can be patched upstream to django_compressor. Hint hint @jezdez, keep an eye on me :)
Metadata
Release files for django-jingo-offline-compressor 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-jingo-offline-compressor-0.0.7.tar.gz | 12.4 kB | Without provenance | Details for django-jingo-offline-compressor-0.0.7.tar.gz |
Release files / django-jingo-offline-compressor-0.0.7.tar.gz
| Download URL | django-jingo-offline-compressor-0.0.7.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e0deb44fe46b8e0036c6c7b301255d518a47c240beb36569fb51ae9a0300e93
|
|
BLAKE2b-256 checksum How to use checksums |
cba303afc90c558a94b8b8cd7f82d6c8c1879f71c48a19166df6f0b99cb67793
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-jingo-offline-compressor 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.