This release is a pre-release and may not be stable for production use.
===================
``django-bundledmedia`` is a Django application for adding compressed CSS and
JS files in some prepared slots.
This functionality was splitted out of Merengue CMS.
Installing
----------
* Install package from pypi::
$ easy_install django-bundledmedia
* Include ``bundledmedia`` in the ``INSTALLED_APPS`` setting.
* Include ``bundledmedia.middleware.BundledMediaMiddleware`` in the ``MIDDLEWARE_CLASSES`` setting.
Usage
-----
In your base template (i.e. ``base.html``)::
{% load bundledmedia %}
<html>
<head>
{# placeholder to allow plugins and other templates to add css assets #}
{% bundledmedia "css" "css" %}
...
{% bundledmedia "extracss" "css" %}
</head>
<body>
...
{# placeholder to allow plugins and other templates to add javascript assets #}
{% bundledmedia "js" "js" %}
</body>
</html>
In your included template (i.e. ``inc.sidebar.html``)::
{% load bundledmedia %}
{% addmedia "css" %}
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/sidebar.css"/>
{% endaddmedia %}
{% addmedia "js" %}
<script language="javascript" src="{{ MEDIA_URL }}js/jquery.sidebar.js"></script>
{% endaddmedia %}
...
In your specific template (i.e. ``myview.html``)::
{% load bundledmedia %}
{% addmedia "extracss" %}
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/myview.css"/>
{% endaddmedia %}
...
This code will render all chunks of code of all the included templates in the
placeholders above.
Compression
-----------
``django-bundledmedia`` uses ``django-compressor`` to render compressed CSS and
JS when the ``COMPRESS`` setting is set to ``True``
0.1b3
----
* Backward incompatible improvement: using new ``media_type`` parameter to get a more explicit type definition (JS or CSS).
0.1b2
----
* Not generating compressed JS or CSS if there is no content to compress.
0.1b1
----
* More flexible naming conventions in the bundled blocks.
0.1a
----
* Initial version.
Metadata
Release files for django-bundledmedia 0.1b3
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 | |
|---|---|---|---|---|
| django-bundledmedia-0.1b3.tar.gz | 11.8 kB | Without provenance | Details |
Release files / django-bundledmedia-0.1b3.tar.gz
| Download URL | django-bundledmedia-0.1b3.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b24121eac3730c26fc75bcd6e91a57a658593590eccabcbbf394cc3a00197773
|
|
BLAKE2b-256 checksum How to use checksums |
71f76539da67ea6ee091c95b713e0447f2c06295dfb975b23336eae991cfec6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-bundledmedia 0.1b3
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.