summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorMarkus Holtermann <info@markusholtermann.eu>2014-12-17 14:01:19 +0100
committerTim Graham <timograham@gmail.com>2014-12-17 08:26:36 -0500
commitb6c05b2b94d475de773e933c20a8d6d8a5dca5e5 (patch)
tree82d598115b553dff8d3149606f449bab3b4f22cc /docs/ref
parent3ac7d83ba501fb6559585b53dab3530a9503ce0c (diff)
[1.6.x] Fixed display of lists after website redesign
Thanks Brian Jacobel for the report. refs django/djangoproject.com#197 Backport of c7786550c4ed396b8580db58f7da60e850894d19 from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/templates/builtins.txt34
1 files changed, 24 insertions, 10 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index 6578a7ae3a..a0fcf11800 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -810,13 +810,18 @@ This complex tag is best illustrated by way of an example: say that "places" is
...and you'd like to display a hierarchical list that is ordered by country, like this:
* India
- * Mumbai: 19,000,000
- * Calcutta: 15,000,000
+
+ * Mumbai: 19,000,000
+ * Calcutta: 15,000,000
+
* USA
- * New York: 20,000,000
- * Chicago: 7,000,000
+
+ * New York: 20,000,000
+ * Chicago: 7,000,000
+
* Japan
- * Tokyo: 33,000,000
+
+ * Tokyo: 33,000,000
You can use the ``{% regroup %}`` tag to group the list of cities by country.
@@ -870,15 +875,24 @@ With this input for ``cities``, the example ``{% regroup %}`` template code
above would result in the following output:
* India
- * Mumbai: 19,000,000
+
+ * Mumbai: 19,000,000
+
* USA
- * New York: 20,000,000
+
+ * New York: 20,000,000
+
* India
- * Calcutta: 15,000,000
+
+ * Calcutta: 15,000,000
+
* USA
- * Chicago: 7,000,000
+
+ * Chicago: 7,000,000
+
* Japan
- * Tokyo: 33,000,000
+
+ * Tokyo: 33,000,000
The easiest solution to this gotcha is to make sure in your view code that the
data is ordered according to how you want to display it.