.count is definitely the way to go. Although, I would probably pass it
to your template instead of determining it there.

On Sep 24, 10:32 am, Chris Withers <ch...@simplistix.co.uk> wrote:
> Chris Withers wrote:
> >      objects = model.objects.all()
> >      paginator = Paginator(objects,10)
> >      return render_to_response(
> >          'index.html',dict(
> >              objects = paginator.page(page),
> >              total_objects = len(objects),
> >              )
> >          )
>
> I'm guessing the correct answer is not to pass total_objects at all but
> just to use {{objects.paginator.count}} in my template?
>
> cheers,
>
> Chris
>
> --
> Simplistix - Content Management, Batch Processing & Python Consulting
>             -http://www.simplistix.co.uk
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to