This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
django-bundledmedia
===================

``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.
Release History

Release History

0.1b3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1b2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1b1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1a

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-bundledmedia-0.1b3.tar.gz (11.8 kB) Copy SHA256 Checksum SHA256 Source Jun 8, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting