Skip to main content

A central repository for Django apps to register any static media that needs to be included.

Project description


A central repository for registering scripts and styles for your applications. This is similar to how the Django form media works,
except that instead of including the media in each form, they are expected to be included in some base template so they are available on every page.

This is useful when dealing with single page web apps that use client side MVC frameworks like Backbone.js and you have multiple Django apps that are providing their own media.

## Installing

Install from pip
sudo pip install django_mediamanager

Add the content processor

from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS


Autodiscover any media within your applications. Add this to your main
import django_mediamanager

## Adding media
Your Django applications can provide a file that registers all their media. The media files are expected to be in a "static" directory within your application

import django_mediamanager
"all": (

## Including media in your templates
You can use the media manager's context processors to include all the registered media in your templates. For example:



Project details

Download files


Files for django-mediamanager, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django-mediamanager-0.1.1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by
