diff options
| author | Gary Wilson Jr <gary.wilson@gmail.com> | 2007-08-26 01:11:20 +0000 |
|---|---|---|
| committer | Gary Wilson Jr <gary.wilson@gmail.com> | 2007-08-26 01:11:20 +0000 |
| commit | 1a1a58c9f89f7b34fec05d426472b134d3e44096 (patch) | |
| tree | 2bd934c04cfae16d3662fc45a5fd1f4801c0315c /docs | |
| parent | 32c729be10271173a71c1505ae658da332995b04 (diff) | |
Fixed #3184 -- Changed the `unordered_list` template filter to use a more simple format, while maintaining backwards compatibility with the old format. `unordered_list` now works with a simple list of items. Thanks for the patch, SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/templates.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/templates.txt b/docs/templates.txt index 6cebd3b7bd..8bfa40dc5f 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -1301,9 +1301,14 @@ unordered_list Recursively takes a self-nested list and returns an HTML unordered list -- WITHOUT opening and closing <ul> tags. +**Changed in Django development version** + +The format accepted by ``unordered_list`` has changed to an easier to +understand format. + The list is assumed to be in the proper format. For example, if ``var`` contains -``['States', [['Kansas', [['Lawrence', []], ['Topeka', []]]], ['Illinois', []]]]``, -then ``{{ var|unordered_list }}`` would return:: +``['States', ['Kansas', ['Lawrence', 'Topeka'], 'Illinois']]``, then +``{{ var|unordered_list }}`` would return:: <li>States <ul> @@ -1317,6 +1322,9 @@ then ``{{ var|unordered_list }}`` would return:: </ul> </li> +Note: the previous more restrictive and verbose format is still supported: +``['States', [['Kansas', [['Lawrence', []], ['Topeka', []]]], ['Illinois', []]]]``, + upper ~~~~~ |
