flask-themes 出现TemplateNotFound问题
2013-03-17 00:00
225 查看
今天学习flask-themes(https://bitbucket.org/leafstorm/flask-themes/src),运行源码中的example时发现模板不起作用,解决办法:https://bitbucket.org/leafstorm/flask-themes/pull-request/2/fix-to-make-jinjas-include-and-import/diff
flaskext/themes.py line:419
flaskext/themes.py line:419
@contextfunction
def global_theme_template(ctx, templatename, fallback=True):
theme = active_theme(ctx)
- templatepath = '_themes/%s/%s' % (theme, templatename)
+ if USING_BLUEPRINTS:
+ templatepath = '%s/%s' % (theme, templatename)
+ else:
+ templatepath = '_themes/%s/%s' % (theme, templatename)
if (not fallback) or template_exists(templatepath):
return templatepath
else:
相关文章推荐
- flask 出现 TemplateNotFound的问题
- 编译Uboot 出现/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found的问题解决方法
- eclipse新建android工程出现This template depends on Android Support Library问题
- Android动态加载jar DexClassLoader 出现ClassNotFound的问题
- MFC/OCX链接Directshow/strmbasd.lib出现的问题unresolved external symbol "class CFactoryTemplate * g_Templates"
- C++:关于template与friend联合出现的问题
- /includes/cls_template.php on line 406 Ecshop出现问题
- ssh框架整合的时候出现Unable to load configuration问题、getHibernateTemplate().save空指针
- spring-data-redis 的RedisTemplate 开启enableTransactionSupport=true出现的问题
- Eclipse 替换jar出现ClassNotFound问题
- Python:Python中Flask出现No module named 'markupsafe._compat'问题的解决方案
- 用pycharm+flask 建立项目以后运行出现ImportError: No module named flask-login问题
- [Eclipse] - 解决导入flask模块出现的Unresolved Import flask问题
- DBUnit单元测试用restTemplate调用接口出现unrecognized token verifyFail:was expection('true','false' or 'null')问题
- flask ---blog 出现的问题总结
- [Eclipse] - 解决导入flask模块出现的Unresolved Import flask问题
- 对两种web开发中经常出现的异常问题的总结(NoClassDefFound,ClassNotFound)
- this.getHibernateTemplate().find()出现查询到的记录重复的问题
- 问题解决:打开word2010时出现“Cannot find the Word template:WordToRqm.dot”
- 截断显示文章标题时,出现乱码或者“?”问号的问题