admin.py 文件源码

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

项目:nat64check 作者: sjm-steffann 项目源码 文件源码
def admin_v6only_data(self, measurement):
        response = yaml.dump(measurement.v6only_data)

        # Get the Pygments formatter
        formatter = HtmlFormatter(style='colorful')

        # Highlight the data
        response = highlight(response, YamlLexer(), formatter)

        # Get the stylesheet
        style = "<style>" + formatter.get_style_defs() + "</style><br>"

        # Safe the output
        return mark_safe(style + response)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号