On Tue, Oct 19, 2010 at 9:45 AM, Ed <edmund.rog...@gmail.com> wrote: > Why is that? Is there a way to do this that doesn't result in two > queries?
check: http://docs.djangoproject.com/en/1.2/topics/db/optimization/#don-t-overuse-count-and-exists there's a tip about loading the whole query once: use {% with actor_list.all as actors %}. after that, you could use {{actors|first}} to get the first one -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.