the actual fix - all list views shuld look for app instance config before settings.py
This commit is contained in:
parent
da1adf8812
commit
4720e73497
1 changed files with 3 additions and 3 deletions
|
@ -62,6 +62,9 @@ class BaseBlogListView(BaseBlogView):
|
||||||
context['TRUNCWORDS_COUNT'] = get_setting('POSTS_LIST_TRUNCWORDS_COUNT')
|
context['TRUNCWORDS_COUNT'] = get_setting('POSTS_LIST_TRUNCWORDS_COUNT')
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
def get_paginate_by(self, queryset):
|
||||||
|
return (self.config and self.config.paginate_by) or get_setting('PAGINATION')
|
||||||
|
|
||||||
|
|
||||||
class PostDetailView(TranslatableSlugMixin, BaseBlogView, DetailView):
|
class PostDetailView(TranslatableSlugMixin, BaseBlogView, DetailView):
|
||||||
context_object_name = 'post'
|
context_object_name = 'post'
|
||||||
|
@ -101,9 +104,6 @@ class PostDetailView(TranslatableSlugMixin, BaseBlogView, DetailView):
|
||||||
class PostListView(BaseBlogListView, ListView):
|
class PostListView(BaseBlogListView, ListView):
|
||||||
view_url_name = 'djangocms_blog:posts-latest'
|
view_url_name = 'djangocms_blog:posts-latest'
|
||||||
|
|
||||||
def get_paginate_by(self, queryset):
|
|
||||||
return (self.config and self.config.paginate_by) or get_setting('PAGINATION')
|
|
||||||
|
|
||||||
|
|
||||||
class PostArchiveView(BaseBlogListView, ListView):
|
class PostArchiveView(BaseBlogListView, ListView):
|
||||||
date_field = 'date_published'
|
date_field = 'date_published'
|
||||||
|
|
Loading…
Reference in a new issue