On Jan 6, 2008 5:44 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote:

>
> First of all, Part.objects.all()[:5] is still lazy. SQL query executes
> only when you try to iterate through items.
> And you can slice objects in template with "slice" filter
>
> {% for p in part.object.all|slice:":5" %}
>


Thanks, this is exactly what I was looking for.

Alexandre

--~--~---------~--~----~------------~-------~--~----~
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