module documentation

Undocumented

Class BlockContext Undocumented
Class BlockNode Undocumented
Class ExtendsNode No class docstring; 0/4 instance variable, 0/2 class variable, 1/5 method documented
Class IncludeNode No class docstring; 0/3 instance variable, 0/1 class variable, 1/3 method documented
Function construct_relative_path Convert a relative path (starting with './' or '../') to the full template name based on the current_template_name.
Function do_block Define a block that can be overridden by child templates.
Function do_extends Signal that this template extends a parent template.
Function do_include Load a template and render it with the current context. You can pass additional context using keyword arguments.
Constant BLOCK_CONTEXT_KEY Undocumented
Variable register Undocumented
def construct_relative_path(current_template_name, relative_name): (source)

Convert a relative path (starting with './' or '../') to the full template name based on the current_template_name.

@register.tag('block')
def do_block(parser, token): (source)

Define a block that can be overridden by child templates.

@register.tag('extends')
def do_extends(parser, token): (source)

Signal that this template extends a parent template. This tag may be used in two ways: ``{% extends "base" %}`` (with quotes) uses the literal value "base" as the name of the parent template to extend, or ``{% extends variable %}`` uses the value of ``variable`` as either the name of the parent template to extend (if it evaluates to a string) or as the parent template itself (if it evaluates to a Template object).

@register.tag('include')
def do_include(parser, token): (source)

Load a template and render it with the current context. You can pass additional context using keyword arguments. Example:: {% include "foo/some_include" %} {% include "foo/some_include" with bar="BAZZ!" baz="BING!" %} Use the ``only`` argument to exclude the current context when rendering the included template:: {% include "foo/some_include" only %} {% include "foo/some_include" with bar="1" only %}

BLOCK_CONTEXT_KEY: str = (source)

Undocumented

Value
'block_context'
register = (source)

Undocumented