Fallback to global setting pagination in view
This commit is contained in:
parent
d6516c13c3
commit
a811ef9a0e
1 changed files with 4 additions and 1 deletions
|
@ -64,7 +64,10 @@ class PostListView(BaseBlogView, ListView):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
def get_paginate_by(self, queryset):
|
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):
|
class PostDetailView(TranslatableSlugMixin, BaseBlogView, DetailView):
|
||||||
|
|
Loading…
Reference in a new issue