学习flask web开发遇到的一些问题及解决方法
2016-07-24 16:54
447 查看
Q:ExtDeprecationWarning: Importing flask.ext.script is deprecated, use flask_script instead.
.format(x=modname), ExtDeprecationWarning
A:把
Q:UserWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True to suppress this warning.
warnings.warn(‘SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True to suppress this warning.’)
A:在代码中加一行
Q:heroku login出现问题 如图:
A:原因是ruby版本太低,需升级。命令如下:
参考链接:1.http://stackoverflow.com/questions/26595620/how-to-install-ruby-2-1-4-on-ubuntu-14-04
2.http://qiita.com/35_267_/items/29badc389a1df4d56c6f
.format(x=modname), ExtDeprecationWarning
A:把
flask.ext.script中的
.ext.换成下划线
_
Q:UserWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True to suppress this warning.
warnings.warn(‘SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True to suppress this warning.’)
A:在代码中加一行
track_modifications = app.config.setdefault('SQLALCHEMY_TRACK_MODIFICATIONS' , True)
Q:heroku login出现问题 如图:
A:原因是ruby版本太低,需升级。命令如下:
$ sudo apt-add-repository ppa:brightbox/ruby-ng $ sudo apt-get update $ sudo apt-get install ruby2.2 $ ruby2.2 -v ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux-gnu]
参考链接:1.http://stackoverflow.com/questions/26595620/how-to-install-ruby-2-1-4-on-ubuntu-14-04
2.http://qiita.com/35_267_/items/29badc389a1df4d56c6f
相关文章推荐
- HDU 5735 Born Slippy
- 实现自己的C++ STL--vector容器
- hibernate学习之路
- bzoj 3672 [Noi2014]购票 (线段树+凸壳)
- Android中线程应用
- java构造器的作用
- Java异常处理-----自定义异常
- Java异常处理-----自定义异常
- Mybatis入门
- 刻录DVD_待整理
- Leetcode-add-two-numbers
- CentOS6.5配置01 -- LAMP(appache,mysql,php)安装
- CSS3基础
- 仿乐透购彩app(6)
- HDU 2298 Toxophily
- SpringMVC学习之路
- KMP
- 定义和声明以及extern、static关键字
- ImageView ScaleType属性
- SQL 中的 TRIM 函数