server.py 文件源码

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

项目:django-gateone 作者: jimmy201602 项目源码 文件源码
def enumerate_themes(self):
        """
        Returns a JSON-encoded object containing the installed themes and text
        color schemes.
        """
        #themes = resource_listdir('gateone', '/templates/themes')
        themes = os.listdir(os.path.join(getsettings('BASE_DIR'), 'templates/themes'))
        # Just in case other junk wound up in that directory:
        themes = [a for a in themes if a.endswith('.css')]
        themes = [a.replace('.css', '') for a in themes] # Just need the names
        message = {'go:themes_list': {'themes': themes}}
        self.write_message(message)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号