admin.py 文件源码

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

项目:djangocms-comments 作者: Nekmo 项目源码 文件源码
def changeform_view(self, request, object_id=None, form_url='', extra_context=None):
        extra_context = extra_context or {}
        comment = self.get_object(request, unquote(object_id))
        if comment is not None:
            extra_context['user_agent'] = get_user_agent(comment.user_agent) or truncatechars(comment.user_agent, 60)
            comment.requires_attention = ''
            comment.save()
        changeform = super(CommentAdmin, self).changeform_view(request, object_id=object_id, form_url=form_url,
                                                               extra_context=extra_context)
        return changeform
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号