Django Compressor Mako
This module provide mako template support for Django Compressor.
Usage
All you need to do is to import extension namespace and using it with mako syntax:
<%namespace name="compress" module="django_compressor_mako"/>
<%compress:compress kind="css">
<link rel="stylesheet" href="/static/css/style.css" type="text/css" />
</%compress:compress>
Almost all django-compressor arguments are supported but must be explicitly named:
kind: mandatory, “css” or “js”.
mode: optional, compressor mode, “file” or “inline”.
name: is not supported and will raise a NotImplementedError
Outputs cannot be named and are just named using hash plus extension.
Also note that mako template doesn’t allow blocks inside of <%call>, that means you cannot use the following syntax:
<%namespace name="compress" module="django_compressor_mako"/>
<%compress:compress kind="css">
<%block name="more_css"/>
</%compress:compress>
Offline compression
In order to use offline compression you must first create cached compressed files and manifest using python ./manage.py compress_mako.
Shorter functions
Additionally two shorter functions are provided, css and js, same arguments can be passed except kind which is set by default depending on which one is used, eg.:
<%namespace name="compress" module="django_compressor_mako"/>
<%compress:css>
<link rel="stylesheet" href="/static/css/style.css" type="text/css" />
</%compress:css>
<%compress:js>
<script type="text/javascript" src="/static/js/script.js">
</%compress:js>
Metadata
Release files for django_compressor_mako 1.2.0
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_compressor_mako-1.2.0.tar.gz | 5.8 kB | Without provenance | Details for django_compressor_mako-1.2.0.tar.gz |
Release files / django_compressor_mako-1.2.0.tar.gz
| Download URL | django_compressor_mako-1.2.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2cab7d36bcfe97560029a40efb40c57f7966e1eb1ae426f3e1d41bc29663979e
|
|
BLAKE2b-256 checksum How to use checksums |
1c2bfe0271709c4e3400fc0af982d977523623ada29b86d67bea949dfc36cf0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django_compressor_mako 1.2.0
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.