From 2ac1dc3da38cd5d0b5b4d0147e003895066a38c3 Mon Sep 17 00:00:00 2001 From: yomguy Date: Mon, 18 Feb 2013 20:30:20 +0100 Subject: [PATCH] update answer list paginate --- .../templates/teleforma/inc/answer_list.html | 17 +++++------------ teleforma/views/pro.py | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/teleforma/templates/teleforma/inc/answer_list.html b/teleforma/templates/teleforma/inc/answer_list.html index 5ef4a36b..4b5a7c96 100644 --- a/teleforma/templates/teleforma/inc/answer_list.html +++ b/teleforma/templates/teleforma/inc/answer_list.html @@ -3,15 +3,8 @@ {% load teleforma_tags %} {% load pagination_tags %} - +{% autopaginate object_list %} +{% paginate %}
@@ -21,7 +14,7 @@ - + @@ -30,11 +23,11 @@ - +
{% trans "Seminar"%} {% trans "Date submitted"%} {% trans "Summary"%}{% trans "Action / status"%}{% trans "Status"%}
{{ answer.user.last_name }} {{ answer.user.first_name }}{{ answer.question.seminar }}{{ answer.question.seminar.title }} {{ answer.date_submitted }} {{ answer.answer|summary:120 }} {% if user.is_staff %} - diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index 217cc415..688fe41e 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -272,7 +272,7 @@ class AnswersView(ListView): def get_context_data(self, **kwargs): context = super(AnswersView, self).get_context_data(**kwargs) - paginator = Paginator(self.object_list, per_page=12) + paginator = Paginator(self.object_list, per_page=10) try: page = int(self.request.GET.get('page', '1')) except ValueError: -- 2.39.5