def data(self):
return self.get_query(product=self.product).annotate(complete=Max('complete'))
#def wiki_registrations():
# return (
# MediaWikiUser.objects
# .annotate(year=Substr('registration', 1, 4))
# .order_by('year')
# .values('year')
# .annotate(
# users=Count('id', distinct=True)
# )
# )
#
#
#def wiki_revisions():
# return (
# Revision.objects
# .annotate(year=Substr('rev_timestamp', 1, 4))
# .order_by('year')
# .values('year')
# .annotate(
# revisions=Count('id')
# )
# )
#
#
#def wiki_registrations_year(year):
# return (
# MediaWikiUser.objects
# .annotate(
# year=Substr('registration', 1, 4),
# month=Substr('registration', 5, 2)
# )
# .filter(year=str(year).encode())
# .order_by('month')
# .values('month')
# .annotate(
# users=Count('id', distinct=True)
# )
# )
#
#
#def wiki_revisions_year(year):
# return (
# Revision.objects
# .annotate(
# year=Substr('rev_timestamp', 1, 4),
# month=Substr('rev_timestamp', 5, 2)
# )
# .filter(year=str(year).encode())
# .order_by('month')
# .values('month')
# .annotate(
# revisions=Count('id')
# )
# )
评论列表
文章目录