Index: docs/ref/models/instances.txt
===================================================================
--- docs/ref/models/instances.txt (revision 13081)
+++ docs/ref/models/instances.txt (working copy)
@@ -515,6 +515,8 @@
More details on named URL patterns are in the :ref:`URL dispatch documentation
`.
+.. _extra-instance-methods:
+
Extra instance methods
======================
Index: docs/ref/templates/builtins.txt
===================================================================
--- docs/ref/templates/builtins.txt (revision 13081)
+++ docs/ref/templates/builtins.txt (working copy)
@@ -825,6 +825,18 @@
{% regroup people|dictsort:"gender" by gender as gender_list %}
+Note that *methods* are also valid arguments to the regroup tag. For
+example, if the "gender" field on the model in this example is a CHOICES
+field rather than a foreign key, ``{{ gender.grouper }}`` will naturally
+have a :ref:`get_FOO_display() ` method
+available as an attribute, so you can group on the display string
+rather than the CHOICES key::
+
+ {% regroup people by get_gender_display as gender_list %}
+
+``{{ gender.grouper }}`` will now display the value fields from the
+CHOICES set rather than the keys.
+
.. templatetag:: spaceless
spaceless