From c2f1aa5a3c605927f1fb86c0d4eaa9f9067a0313 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 1 Sep 2012 09:24:39 -0400 Subject: [1.4.x] Fixed #13608 - Noted that template lookups use literal values. Backport of 74c025d0285450bf277afbee095172af54562ab6 from master. --- docs/ref/templates/api.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/ref') diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index 1955bd4ead..aa386254aa 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -122,6 +122,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:: -- cgit v1.3