Ticket #7863: r8016-regroup-sorted.diff
File r8016-regroup-sorted.diff, 777 bytes (added by , 16 years ago) |
---|
-
docs/templates.txt
982 982 regroup 983 983 ~~~~~~~ 984 984 985 Regroup a list of alike objects bya common attribute.985 Takes a sorted list of like objects and regroups the list using a common attribute. 986 986 987 987 This complex tag is best illustrated by use of an example: say that ``people`` 988 is a list of people represented by dictionaries with ``first_name``,989 `` last_name``, and ``gender`` keys::988 is a list of people, sorted by ``last_name``, represented by dictionaries with 989 ``first_name``, ``last_name``, and ``gender`` keys:: 990 990 991 991 people = [ 992 992 {'first_name': 'George', 'last_name': 'Bush', 'gender': 'Male'},