module documentation

Undocumented

Variable register Undocumented
Class ​Prefix​Node No class docstring; 0/2 instance variable, 0/3 method, 1/2 class method documented
Class ​Static​Node No class docstring; 0/2 instance variable, 0/1 class variable, 0/4 method, 1/2 class method documented
Function do​_static Join the given path with the STATIC_URL setting.
Function get​_media​_prefix Populate a template variable with the media prefix, settings.MEDIA_URL.
Function get​_static​_prefix Populate a template variable with the static prefix, settings.STATIC_URL.
Function static Given a relative path to a static asset, return the absolute path to the asset.
register =

Undocumented

@register.tag('static')
def do_static(parser, token):

Join the given path with the STATIC_URL setting.

Usage:

{% static path [as varname] %}

Examples:

{% static "myapp/css/base.css" %}
{% static variable_with_path %}
{% static "myapp/css/base.css" as admin_base_css %}
{% static variable_with_path as varname %}
@register.tag
def get_media_prefix(parser, token):

Populate a template variable with the media prefix, settings.MEDIA_URL.

Usage:

{% get_media_prefix [as varname] %}

Examples:

{% get_media_prefix %}
{% get_media_prefix as media_prefix %}
@register.tag
def get_static_prefix(parser, token):

Populate a template variable with the static prefix, settings.STATIC_URL.

Usage:

{% get_static_prefix [as varname] %}

Examples:

{% get_static_prefix %}
{% get_static_prefix as static_prefix %}
def static(path):
Given a relative path to a static asset, return the absolute path to the asset.