on site in manager

This commit is contained in:
Mark 2016-09-05 15:01:29 +03:00 committed by Iacopo Spalletti
parent c013661a53
commit 40171e46a6
No known key found for this signature in database
GPG key ID: BDCBC2EB289F60C6

View file

@ -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).