Skip to main content

Extensible media/asset manager for Django

Project description

django-mediagenerator is an asset manager for Django. With django-mediagenerator you can combine and compress your JS and CSS files. It also takes care of automatically versioning your files (including images), so browsers will load an updated version when you change any of your files. This works by adding a version hash to the file name. That way you can still use HTTP caches.

An important advantage of the media generator is that it works in sandboxed hosting environments like App Engine.

With its backend API the media generator allows you to flexibly add new features and adjust it to your needs. It also comes with several backends pre-installed. For example, you can use Sass, Python (via pyjs/Pyjamas), and PyvaScript.

Also, the media generator provides a development mode in which files don’t get combined and compressed. This simplifies debugging because you can easily see which file contains a bug. Moreover, some backends add extra debug information in development mode to further simplify debugging.

Visit the project site for more information.

Changelog

Version 1.2

Upgrade notes: Please add 'mediagenerator.middleware.MediaMiddleware' as the first middleware in your settings.py.

  • Got rid of unnecessary HTTP roundtrips when USE_ETAGS = True

  • Added Django template filter (by default only used for .html files), contributed by Matt Bierner

  • Added media_url() filter which provides access to generated URLs from JS

  • CopyFiles backend can now ignore files matching certain regex patterns

Version 1.1

  • Added Closure compiler backend

  • Added HTML5 cache manifest file backend

  • Fixed Sass support on Linux

  • Updated pyjs filter to latest pyjs repo version

  • “swf” and “ico” files are now copied, too, by default

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-mediagenerator-1.2.zip (31.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page