From d86f53f81cc87f355f9dd5dda53bc2c055174ac0 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 11 Oct 2014 03:31:02 -0400 Subject: [PATCH] Use the cached page count --- mayan/apps/documents/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mayan/apps/documents/widgets.py b/mayan/apps/documents/widgets.py index 6b3587203e..63347415a4 100644 --- a/mayan/apps/documents/widgets.py +++ b/mayan/apps/documents/widgets.py @@ -54,7 +54,7 @@ class DocumentPagesCarouselWidget(forms.widgets.Widget): gallery_name='document_pages', fancybox_class='fancybox-noscaling', image_class='lazy-load-carousel', - title=ugettext(u'Page %(page_num)d of %(total_pages)d') % {'page_num': page.page_number, 'total_pages': len(value.pages.all())}, + title=ugettext(u'Page %(page_num)d of %(total_pages)d') % {'page_num': page.page_number, 'total_pages': value.page_count}, size=MULTIPAGE_PREVIEW_SIZE, ) )