Flask错误、以及flask包CDN源替换


Flask报错:

ModuleNotFoundError: No module named ‘flask._compat‘

修改flask_script中__init__.py文件

把from ._compat import text_type 改成 from flask_script._compat import text_type 

flask包CDN参数:

在各个包内__init__.py文件中修改

flask_bootstrap参数CDN

bootstrap = lwrap(WebCDN('https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/%s/' %BOOTSTRAP_VERSION), local)

jquery = lwrap(WebCDN('https://cdn.bootcdn.net/ajax/libs/jquery/%s/' %JQUERY_VERSION), local)

html5shiv = lwrap(WebCDN('https://cdn.bootcdn.net/ajax/libs/html5shiv/%s/' %HTML5SHIV_VERSION))

respondjs = lwrap(WebCDN('https://cdn.bootcdn.net/ajax/libs/respond.js/%s/' %RESPONDJS_VERSION))

flask_moment参数CDN

https://cdn.bootcdn.net/ajax/libs/moment.js

flask_pegedown参数CDN

https://cdn.bootcdn.net/ajax/libs/pagedown/1.0/Markdown.Converter.min.js

https://cdn.bootcdn.net/ajax/libs/pagedown/1.0/Markdown.Sanitizer.min.js

博文最后更新时间:


评论

发表评论

请登陆发表评论