diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index c52194e..11ae8da 100644
|
a
|
b
|
dot in a variable name, it tries the following lookups, in this order:
|
| 125 | 125 | * Attribute lookup. Example: ``foo.bar`` |
| 126 | 126 | * List-index lookup. Example: ``foo[bar]`` |
| 127 | 127 | |
| | 128 | Note that "bar" in a template expression like ``{{ foo.bar }}`` will be |
| | 129 | intrepreted as a literal string and not using the value of the variable "bar", |
| | 130 | if one exists in the template context. |
| | 131 | |
| 128 | 132 | The template system uses the first lookup type that works. It's short-circuit |
| 129 | 133 | logic. Here are a few examples:: |
| 130 | 134 | |
diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt
index 2fa6643..1befc15 100644
|
a
|
b
|
Use a dot (``.``) to access attributes of a variable.
|
| 102 | 102 | attempts to loop over a ``collections.defaultdict``:: |
| 103 | 103 | |
| 104 | 104 | {% for k, v in defaultdict.iteritems %} |
| 105 | | Do something with k and v here... |
| | 105 | Do something with k and v here... |
| 106 | 106 | {% endfor %} |
| 107 | 107 | |
| 108 | 108 | Because dictionary lookup happens first, that behavior kicks in and provides |
| … |
… |
If you use a variable that doesn't exist, the template system will insert
|
| 116 | 116 | the value of the :setting:`TEMPLATE_STRING_IF_INVALID` setting, which is set |
| 117 | 117 | to ``''`` (the empty string) by default. |
| 118 | 118 | |
| | 119 | Note that "bar" in a template expression like ``{{ foo.bar }}`` will be |
| | 120 | intrepreted as a literal string and not using the value of the variable "bar", |
| | 121 | if one exists in the template context. |
| | 122 | |
| 119 | 123 | Filters |
| 120 | 124 | ======= |
| 121 | 125 | |