Fallback to global setting pagination in view

This commit is contained in:
Iacopo Spalletti 2015-10-18 10:00:12 +02:00
parent d6516c13c3
commit a811ef9a0e

View file

@ -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):