摘要:
测试代码:import timefrom flask.ext.cache import Cachefrom flask import Flaskapp = Flask(__name__)app.config['CACHE_TYPE'] = 'simple'app.cache = Cache(app)... 阅读全文
摘要:
import sys reload(sys) sys.setdefaultencoding('utf8') 阅读全文
摘要:
如果邮件格式是文本格式,使用“\r\n” 如果件是HTML格式,使用"" 阅读全文
摘要:
1. linux查看文件指定多行sed -n 'm,np' filesed -n 'm1p;m2p;m3p' file2. 将命令输出保存到变量中 var=$(ls) echo $var3. 根据时区和时间戳打印日期endtime=$(TZ='America/Los_Angeles' date -... 阅读全文
摘要:
原文地址:http://stackoverflow.com/questions/7335780/how-to-post-a-django-form-with-ajax-jqueryhtml:view: if request.is_ajax() and request.method == "POST": form = TestForm(request.POST, instance=test) if form.is_valid(): form.save() results[ 'status' ] =True ... 阅读全文
摘要:
[root@localhost setuptools-1.0]# /usr/local/python27/bin/easy_install virtualenvSearching for virtualenvReading https://pypi.python.org/simple/virtualenv/Download error on https://pypi.python.org/simple/virtualenv/: unknown url type: https -- Some packages may not be found!Couldn't find index pa 阅读全文