class documentation

class Engine: (source)

View In Hierarchy

Undocumented

Static Method get_default Return the first DjangoTemplates backend that's configured, or raise ImproperlyConfigured if none are configured.
Method __init__ Undocumented
Method __repr__ Undocumented
Method find_template Undocumented
Method find_template_loader Undocumented
Method from_string Return a compiled Template object for the given template code, handling template inheritance recursively.
Method get_template Return a compiled Template object for the given template name, handling template inheritance recursively.
Method get_template_builtins Undocumented
Method get_template_libraries Undocumented
Method get_template_loaders Undocumented
Method render_to_string Render the template specified by template_name with the given context. For use in Django's test suite.
Method select_template Given a list of template names, return the first that can be loaded.
Class Variable default_builtins Undocumented
Instance Variable app_dirs Undocumented
Instance Variable autoescape Undocumented
Instance Variable builtins Undocumented
Instance Variable context_processors Undocumented
Instance Variable debug Undocumented
Instance Variable dirs Undocumented
Instance Variable file_charset Undocumented
Instance Variable libraries Undocumented
Instance Variable loaders Undocumented
Instance Variable string_if_invalid Undocumented
Instance Variable template_builtins Undocumented
Instance Variable template_libraries Undocumented
Property template_context_processors Undocumented
Property template_loaders Undocumented

Return the first DjangoTemplates backend that's configured, or raise ImproperlyConfigured if none are configured. This is required for preserving historical APIs that rely on a globally available, implicitly configured engine such as: >>> from django.template import Context, Template >>> template = Template("Hello {{ name }}!") >>> context = Context({'name': "world"}) >>> template.render(context) 'Hello world!'

def __init__(self, dirs=None, app_dirs=False, context_processors=None, debug=False, loaders=None, string_if_invalid='', file_charset='utf-8', libraries=None, builtins=None, autoescape=True): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def find_template(self, name, dirs=None, skip=None): (source)

Undocumented

def find_template_loader(self, loader): (source)

Undocumented

def from_string(self, template_code): (source)

Return a compiled Template object for the given template code, handling template inheritance recursively.

def get_template(self, template_name): (source)

Return a compiled Template object for the given template name, handling template inheritance recursively.

def get_template_builtins(self, builtins): (source)

Undocumented

def get_template_libraries(self, libraries): (source)

Undocumented

def get_template_loaders(self, template_loaders): (source)

Undocumented

def render_to_string(self, template_name, context=None): (source)

Render the template specified by template_name with the given context. For use in Django's test suite.

def select_template(self, template_name_list): (source)

Given a list of template names, return the first that can be loaded.

default_builtins: list[str] = (source)

Undocumented

app_dirs = (source)

Undocumented

autoescape = (source)

Undocumented

builtins = (source)

Undocumented

context_processors = (source)

Undocumented

Undocumented

Undocumented

file_charset = (source)

Undocumented

libraries = (source)

Undocumented

Undocumented

string_if_invalid = (source)

Undocumented

template_builtins = (source)

Undocumented

template_libraries = (source)

Undocumented

@cached_property
template_context_processors = (source)

Undocumented

@cached_property
template_loaders = (source)

Undocumented