From a811ef9a0e351b0bb48800f6a82129ce7017733e Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 18 Oct 2015 10:00:12 +0200 Subject: [PATCH] Fallback to global setting pagination in view --- djangocms_blog/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/djangocms_blog/views.py b/djangocms_blog/views.py index b982e02..5bb995f 100644 --- a/djangocms_blog/views.py +++ b/djangocms_blog/views.py @@ -64,7 +64,10 @@ class PostListView(BaseBlogView, ListView): return context def get_paginate_by(self, queryset): - return self.config.paginate_by + if self.config.paginate_by: + return self.config.paginate_by + else: + return get_setting('PAGINATION') class PostDetailView(TranslatableSlugMixin, BaseBlogView, DetailView):