Only list posts from the current site

This fixes a regression introduced by a1b2c56305
in which the `on_site()` filter from the blog posts list view was removed.
This commit is contained in:
Sylvain Fankhauser 2016-04-26 13:38:50 +02:00 committed by Iacopo Spalletti
parent e29d621625
commit 3f2eb3f83d
No known key found for this signature in database
GPG key ID: BDCBC2EB289F60C6

View file

@ -44,7 +44,7 @@ class BaseBlogView(AppConfigMixin, ViewUrlMixin):
if not getattr(self.request, 'toolbar', False) or not self.request.toolbar.edit_mode:
queryset = queryset.published()
setattr(self.request, get_setting('CURRENT_NAMESPACE'), self.config)
return queryset
return queryset.on_site()
def get_template_names(self):
template_path = (self.config and self.config.template_prefix) or 'djangocms_blog'