Collin Grady wrote:
> view:
>
> poems =
> Poem.objects.filter(approved=True).select_related().order_by('auth_user.username')
>
> template:
>
> {% regroup poems by user as grouped %}
> {% for group in grouped %}
> {{ group.grouper }}
> {% for poem in group.list %}
> {{ poem.title }}
> {% endfor %}
> {% endfor %}
>
Can you explain how regroup works?
This is probably the solution to my problem i posted a few days ago: subject:
grouping, replies: 0.
Carl K
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---