backends

Extensions of the standard Django template backends that add a few more configuration parameters and functionality necessary for the static engine. These backends should be used instead of the standard backends!

class render_static.backends.django.StaticDjangoTemplates[source]

Bases: StaticEngine, DjangoTemplates

Extend the standard django.template.backends.django.DjangoTemplates backend to add options and change the default loaders.

By default this backend will search for templates in application directories named static_templates. The app_dir option is added to the standard options to allow users to override this location.

__init__(params)[source]
Parameters:

params (Dict) – The parameters as passed into the STATIC_TEMPLATES configuration for this backend.

Return type:

None

classmethod __new__(*args, **kwargs)
class render_static.backends.jinja2.StaticJinja2Templates[source]

Bases: StaticEngine, Jinja2

Extend the standard django.template.backends.jinja2.Jinja2 backend to add options. Unlike with the standard backend, the loaders used for this backend remain unchanged.

By default this backend will search for templates in application directories named static_jinja2. The app_dir option is added to the standard option to allow users to override this location.

__init__(params)[source]
Parameters:

params (Dict) – The parameters as passed into the STATIC_TEMPLATES configuration for this backend.

Return type:

None

classmethod __new__(*args, **kwargs)