Changes between Version 4 and Version 5 of CookBookTemplateTagRegroup


Ignore:
Timestamp:
03/03/2006 01:29:03 AM (9 years ago)
Author:
Russell Cloran <russell@…>
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CookBookTemplateTagRegroup

    v4 v5  
    22django version : 0.91
    33
    4 If you need to group a list of objects by a choice like fied '''choices = CATEGORY_CHOICES''',
     4If you need to group a list of objects by a choice (eg, field has '''choices = CATEGORY_CHOICES'''),
    55here is the trick.
    66
    7 A Model.
     7'''The Model:'''
    88{{{
    99#!python
     
    2525}}}
    2626
    27 The Regroup tag in action, the thing is that you don't want to display the category
    28 number bit its corresponding name. (e.g not '1' but 'Entrées').
     27And here is the {{{regroup}}} tag in action. The thing is that you don't want to display the category
     28number, but its corresponding name. (e.g not '1' but 'Entrées').
    2929
    30 Temmplate
     30'''The Template:'''
    3131{{{
    3232#!python
Back to Top