Ticket #7863: r8016-regroup-sorted.diff

File r8016-regroup-sorted.diff, 777 bytes (added by Adam Vandenberg, 16 years ago)

Attempt at clarifying the regroup docs.

  • docs/templates.txt

     
    982982regroup
    983983~~~~~~~
    984984
    985 Regroup a list of alike objects by a common attribute.
     985Takes a sorted list of like objects and regroups the list using a common attribute.
    986986
    987987This 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::
     988is a list of people, sorted by ``last_name``, represented by dictionaries with
     989``first_name``, ``last_name``, and ``gender`` keys::
    990990
    991991    people = [
    992992        {'first_name': 'George', 'last_name': 'Bush', 'gender': 'Male'},
Back to Top