class documentation

class Media:

View In Hierarchy

Undocumented

Static Method merge Merge lists while trying to keep the relative order of the elements. Warn if the lists have the same elements in a different relative order.
Method __add__ Undocumented
Method __getitem__ Return a Media object that only contains media of the given type.
Method __init__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Method absolute​_path Given a relative or absolute path to a static asset, return an absolute path. An absolute path will be returned unchanged while a relative path will be passed to django.templatetags.static.static().
Method render Undocumented
Method render​_css Undocumented
Method render​_js Undocumented
Instance Variable ​_css​_lists Undocumented
Instance Variable ​_js​_lists Undocumented
Property ​_css Undocumented
Property ​_js Undocumented
@staticmethod
def merge(*lists):

Merge lists while trying to keep the relative order of the elements. Warn if the lists have the same elements in a different relative order.

For static assets it can be important to have them included in the DOM in a certain order. In JavaScript you may not be able to reference a global or in CSS you might want to override a style.

def __add__(self, other):

Undocumented

def __getitem__(self, name):
Return a Media object that only contains media of the given type.
def __init__(self, media=None, css=None, js=None):

Undocumented

def __repr__(self):

Undocumented

def __str__(self):

Undocumented

def absolute_path(self, path):
Given a relative or absolute path to a static asset, return an absolute path. An absolute path will be returned unchanged while a relative path will be passed to django.templatetags.static.static().
def render(self):

Undocumented

def render_css(self):

Undocumented

def render_js(self):

Undocumented

_css_lists =

Undocumented

_js_lists =

Undocumented

@property
_css =

Undocumented

@property
_js =

Undocumented