Thanks! That was it, for anyone else who might encounter this, here's
the code that goes in your template:

{% regroup book_list by name as name_list %}
                                <ul>
                                        {% for name in name_list %}
                                                <li>{{ name.grouper }} ({{ 
name.list|length }})</li>
                                        {% endfor %}
                                </ul>

On Aug 22, 9:43 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 8/22/07, Rohit <[EMAIL PROTECTED]> wrote:
> ...
>
>
>
> > Each book is it's own entry, so right now it appears as:
>
> > Django book
> > Django book
> > Django book
> > Django book ... 41 more times
> ...
> > Is there an easy way of doing this in Django? if not how would you
> > recommend implementing it?
>
> If you're in templates, use the regroup 
> tag:http://www.djangoproject.com/documentation/templates/#regroup
>
> If you're not in templates, look at what the regroup tag does and do that.  
> ;-)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to