随笔分类 -  django

1
摘要:django连接数据库要安装第三方包,比如mysql的就是 python-mysqldb, 用apt-cache search python-mysql 搜索一下。django的project可以放在任意的目录下,安装完版本1.6之后,django-admin.py已经放到了系统路径里去了,如果不能... 阅读全文
posted @ 2014-01-13 16:47 lein.wang 阅读(110) 评论(0) 推荐(0)
摘要:python-magic点击打开链接https://github.com/ahupp/python-magic/ 阅读全文
posted @ 2013-03-08 16:15 lein.wang 阅读(267) 评论(0) 推荐(0)
摘要:git update-index --assume-unchanged -- path/to/file# 启用忽略git update-index --no-assume-unchanged -- path/to/file# 停用忽略点击打开链接https://help.github.com/art... 阅读全文
posted @ 2013-03-05 16:04 lein.wang 阅读(187) 评论(0) 推荐(0)
摘要:sample :点击打开链接http://www.yihaomen.com/article/python/221.htm如果出现怎么切换语言都不翻译的情况,要确保在settings里设置了LOCALE_PATHS = ( '/home/lein/git/paaam/locale',)不然的话,... 阅读全文
posted @ 2013-03-04 17:42 lein.wang 阅读(98) 评论(0) 推荐(0)
摘要:密码认证 和 公私钥 只是2种不同的方式而已。但是每次pull or push 代码的 时候 都要输入密码,让人很头疼。所以还是用公钥私钥的验证方便。2台机器:local & remote//在local上生成公钥私钥对:cd ~/.ssh && ssh-keygen//在.ssh目录下建一个文件夹... 阅读全文
posted @ 2013-03-01 11:01 lein.wang 阅读(172) 评论(0) 推荐(0)
摘要:注册一个developer帐号A后,paypal会建议你建两个test account,一个buyer,一个seller。这没什么。但是如果你想测试一个买,一个卖的流程,只用一个帐号是做不了的。你需要再申请一个新的developer帐号B,再建test account。用A的buyer去买B的sel... 阅读全文
posted @ 2013-02-27 16:01 lein.wang 阅读(253) 评论(0) 推荐(0)
摘要:https://docs.djangoproject.com/en/1.4/howto/legacy-databases/ 阅读全文
posted @ 2013-02-25 17:26 lein.wang 阅读(117) 评论(0) 推荐(0)
摘要:python + mysql,数据库文件已导入。# check versionpython -c "import django; print(django.get_version())"#install pipsudo apt-get install python-pip#install newes... 阅读全文
posted @ 2013-02-25 17:21 lein.wang 阅读(542) 评论(0) 推荐(0)
摘要:kill -9 %1 阅读全文
posted @ 2013-01-11 17:28 lein.wang 阅读(360) 评论(0) 推荐(0)
摘要:git修改提交的用户名和Emailhttp://blog.chinaunix.net/uid-26997997-id-3231891.html 阅读全文
posted @ 2012-12-27 17:22 lein.wang 阅读(96) 评论(0) 推荐(0)
摘要:pg_list 是一个list,str是转换成string的函数map是把第一个参数指定的方法作用于第二个参数指定的列表的每一个元素上面sql = """select placementgroup_placements.placement_id from placementgroup_placeme... 阅读全文
posted @ 2012-12-14 16:53 lein.wang 阅读(328) 评论(0) 推荐(0)
摘要:http://bbs.chinaunix.net/thread-1283789-1-1.html 阅读全文
posted @ 2012-12-11 16:00 lein.wang 阅读(4332) 评论(0) 推荐(0)
摘要:select * from INFORMATION_SCHEMA.columns where COLUMN_NAME Like '%placement%'; 阅读全文
posted @ 2012-12-11 15:18 lein.wang 阅读(141) 评论(0) 推荐(0)
摘要:http://developer.51cto.com/art/201003/187933.htm 阅读全文
posted @ 2012-12-11 14:45 lein.wang 阅读(1281) 评论(0) 推荐(0)
摘要:http://linuxshow.blog.51cto.com/1572053/949717 阅读全文
posted @ 2012-12-10 17:47 lein.wang 阅读(274) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/373812/rollback-file-to-much-earlier-version 阅读全文
posted @ 2012-12-10 16:39 lein.wang 阅读(287) 评论(0) 推荐(0)
摘要:当value是列表的时候,要用getlist 阅读全文
posted @ 2012-11-22 13:35 lein.wang 阅读(207) 评论(0) 推荐(0)
摘要:http://www.cppblog.com/deercoder/archive/2011/11/13/160050.html 阅读全文
posted @ 2012-11-20 18:58 lein.wang 阅读(82) 评论(0) 推荐(0)
摘要:安装地址http://www.webmin.com/tgz.html 阅读全文
posted @ 2012-11-14 14:58 lein.wang 阅读(98) 评论(0) 推荐(0)
摘要:错误信息:warning: You appear to have cloned an empty repository.或者fatal: destination path '.' already exists and is not an empty directory.解决办法:ls -arm .g... 阅读全文
posted @ 2012-11-14 14:44 lein.wang 阅读(168) 评论(0) 推荐(0)

1