sitemap.py 文件源码

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

项目:open-synthesis 作者: twschiller 项目源码 文件源码
def lastmod(self, obj):  # pylint: disable=no-self-use
        """Return the last time the board or its content was structurally modified."""
        # NOTE: self parameter is required to match the Sitemap interface
        def _last_obj(class_):
            return max((o.submit_date for o in class_.objects.filter(board=obj)), default=obj.pub_date)
        return max([obj.pub_date, _last_obj(Evidence), _last_obj(Hypothesis)])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号