On Sun, 2006-05-14 at 15:13 +0530, Amit Upadhyay wrote:
> Lets say I have a Author and Article models, related via many to many.
> On the profile view of authors I want to show the articles they
> contributed to, but not all of them. The number is purely a decision
> of the designer, how does one do a limit/offset in template?
Django supplies a slice filter. So {{article_list|slice:":5"}} will do
what you want.
Regards,
Malcolm
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---