Loading docs/ref/templates/api.txt +4 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,10 @@ dot in a variable name, it tries the following lookups, in this order: * Attribute lookup. Example: ``foo.bar`` * List-index lookup. Example: ``foo[bar]`` Note that "bar" in a template expression like ``{{ foo.bar }}`` will be interpreted as a literal string and not using the value of the variable "bar", if one exists in the template context. The template system uses the first lookup type that works. It's short-circuit logic. Here are a few examples:: Loading docs/topics/templates.txt +5 −1 Original line number Diff line number Diff line Loading @@ -116,6 +116,10 @@ If you use a variable that doesn't exist, the template system will insert the value of the :setting:`TEMPLATE_STRING_IF_INVALID` setting, which is set to ``''`` (the empty string) by default. Note that "bar" in a template expression like ``{{ foo.bar }}`` will be interpreted as a literal string and not using the value of the variable "bar", if one exists in the template context. Filters ======= Loading Loading
docs/ref/templates/api.txt +4 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,10 @@ dot in a variable name, it tries the following lookups, in this order: * Attribute lookup. Example: ``foo.bar`` * List-index lookup. Example: ``foo[bar]`` Note that "bar" in a template expression like ``{{ foo.bar }}`` will be interpreted as a literal string and not using the value of the variable "bar", if one exists in the template context. The template system uses the first lookup type that works. It's short-circuit logic. Here are a few examples:: Loading
docs/topics/templates.txt +5 −1 Original line number Diff line number Diff line Loading @@ -116,6 +116,10 @@ If you use a variable that doesn't exist, the template system will insert the value of the :setting:`TEMPLATE_STRING_IF_INVALID` setting, which is set to ``''`` (the empty string) by default. Note that "bar" in a template expression like ``{{ foo.bar }}`` will be interpreted as a literal string and not using the value of the variable "bar", if one exists in the template context. Filters ======= Loading