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,DjangoTemplatesExtend the standard
django.template.backends.django.DjangoTemplatesbackend to add options and change the default loaders.By default this backend will search for templates in application directories named
static_templates. Theapp_diroption 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_TEMPLATESconfiguration for this backend.- Return type:
None
- classmethod __new__(*args, **kwargs)¶
- class render_static.backends.jinja2.StaticJinja2Templates[source]¶
Bases:
StaticEngine,Jinja2Extend the standard
django.template.backends.jinja2.Jinja2backend 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. Theapp_diroption 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_TEMPLATESconfiguration for this backend.- Return type:
None
- classmethod __new__(*args, **kwargs)¶