Sfoglia il codice sorgente

Fixed incorrect variable name in {% regroup %} docs.

Baptiste Mispelon 8 anni fa
parent
commit
7968bb7fad
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      docs/ref/templates/builtins.txt

+ 4 - 4
docs/ref/templates/builtins.txt

@@ -842,8 +842,8 @@ output (as a string) inside a variable. This is useful if you want to use
 
 Regroups a list of alike objects by a common attribute.
 
-This complex tag is best illustrated by way of an example: say that "places" is
-a list of cities represented by dictionaries containing ``"name"``,
+This complex tag is best illustrated by way of an example: say that ``cities``
+is a list of cities represented by dictionaries containing ``"name"``,
 ``"population"``, and ``"country"`` keys:
 
 .. code-block:: python
@@ -882,8 +882,8 @@ The following snippet of template code would accomplish this::
     {% for country in country_list %}
         <li>{{ country.grouper }}
         <ul>
-            {% for item in country.list %}
-              <li>{{ item.name }}: {{ item.population }}</li>
+            {% for city in country.list %}
+              <li>{{ city.name }}: {{ city.population }}</li>
             {% endfor %}
         </ul>
         </li>