fluent_plugins.py 文件源码

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

项目:django-icekit 作者: ic-labs 项目源码 文件源码
def describe_fluent_content_plugin(plugin):
    render_template = plugin.render_template

    if render_template:
        try:
            path_to_render_template = get_template(render_template).origin.name
        except TemplateDoesNotExist:
            path_to_render_template = render_template
    else:
        path_to_render_template = None

    return {
        'class': dotted_path_object_type(plugin),
        'source_file': inspect.getfile(type(plugin)),
        'verbose_name': force_text(plugin.verbose_name),
        'render_template': render_template,
        'path_to_render_template': path_to_render_template,
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号