commit
1cfacc6557
2 changed files with 10 additions and 0 deletions
|
@ -157,6 +157,9 @@ class GenericDateTaggedManager(TaggedFilterItem, AppHookConfigTranslatableManage
|
||||||
def filter_by_language(self, language, current_site=True):
|
def filter_by_language(self, language, current_site=True):
|
||||||
return self.get_queryset().filter_by_language(language, current_site)
|
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):
|
def get_months(self, queryset=None, current_site=True):
|
||||||
"""
|
"""
|
||||||
Get months with aggregate count (how much posts is in the month).
|
Get months with aggregate count (how much posts is in the month).
|
||||||
|
|
|
@ -134,6 +134,13 @@ class PluginTest(BaseTest):
|
||||||
rendered = plugin.render_plugin(context, ph)
|
rendered = plugin.render_plugin(context, ph)
|
||||||
self.assertTrue(rendered.find('<p>second post first line</p>') > -1)
|
self.assertTrue(rendered.find('<p>second post first line</p>') > -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('<article id="post-first-post"') > -1)
|
||||||
|
self.assertTrue(rendered.find('<article id="post-different-appconfig"') > -1)
|
||||||
|
|
||||||
def test_plugin_tags(self):
|
def test_plugin_tags(self):
|
||||||
pages = self.get_pages()
|
pages = self.get_pages()
|
||||||
posts = self.get_posts()
|
posts = self.get_posts()
|
||||||
|
|
Loading…
Reference in a new issue