graphs.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:osedev 作者: damoti 项目源码 文件源码
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')
#        )
#    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号