loaders.py 文件源码

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

项目:wagtail-themes 作者: moorinteractive 项目源码 文件源码
def get_dirs(self):
        dirs = super(ThemeLoader, self).get_dirs()
        theme = get_theme()
        theme_path = getattr(settings, 'WAGTAIL_THEME_PATH', None)

        if theme:
            if theme_path:
                # Prepend theme path if WAGTAIL_THEME_PATH is set
                theme_dirs = [
                        os.path.join(dir, theme_path, theme) for dir in dirs]
            else:
                # Append theme for each directory in the DIRS option of the
                # TEMPLATES setting
                theme_dirs = [os.path.join(dir, theme) for dir in dirs]
            return theme_dirs

        return dirs
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号