models.py 文件源码

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

项目:lighthouse 作者: dstl 项目源码 文件源码
def usage_this_week(self):
        """ All usage since midnight on Monday """
        today = timezone.now().replace(hour=0, minute=0, second=0)
        last_monday = today + relativedelta(weekday=MO(-1))
        return self.usage.filter(start__gt=last_monday).count()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号