diff --git a/djangocms_blog/managers.py b/djangocms_blog/managers.py index 8091c6a..057e143 100644 --- a/djangocms_blog/managers.py +++ b/djangocms_blog/managers.py @@ -157,6 +157,9 @@ class GenericDateTaggedManager(TaggedFilterItem, AppHookConfigTranslatableManage def filter_by_language(self, language, current_site=True): return self.get_queryset().filter_by_language(language, current_site) + def on_site(self, site=None): + return self.get_queryset().on_site(site) + def get_months(self, queryset=None, current_site=True): """ Get months with aggregate count (how much posts is in the month). diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 8d91a74..284f120 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -134,6 +134,13 @@ class PluginTest(BaseTest): rendered = plugin.render_plugin(context, ph) self.assertTrue(rendered.find('

second post first line

') > -1) + plugin = add_plugin(ph, 'BlogLatestEntriesPlugin', language='en') + context = self.get_plugin_context(pages[0], 'en', plugin, edit=False) + rendered = plugin.render_plugin(context, ph) + # data is picked from both apphook configs + self.assertTrue(rendered.find('
-1) + self.assertTrue(rendered.find('
-1) + def test_plugin_tags(self): pages = self.get_pages() posts = self.get_posts()