上一页 1 ··· 10 11 12 13 14
摘要: 查模型的列名:select column_name from information_schema.columns where table_name= 'your_table';应用:1. 给django的模型自动生成模板:select ''||replace(column_name,'_',' '... 阅读全文
posted @ 2014-08-11 17:19 tommy.yu 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 需求: 实现请假单的电子审批 1. 支持国际化 2. 支持模型级别的访问记录 here we go: 这里会写一系列的文章,来记录我实战的过程,由于接触django没多久,难免有疏漏之处,望拍砖不要太重。 后记 发现cnblog似乎有些鞭长莫及。因为文档编排的关系,最后用word记录了。可以这里查看 阅读全文
posted @ 2014-08-09 10:08 tommy.yu 阅读(398) 评论(0) 推荐(0) 编辑
摘要: Download for Linux and Unix It is easiest to install Git on Linux using the preferred package manager of your Linux distribution. Debian/Ubuntu $ apt- 阅读全文
posted @ 2014-08-07 11:54 tommy.yu 阅读(239) 评论(0) 推荐(0) 编辑
摘要: child_of 此操作符,从代码来看,等价于: [('x','child_of',id)] ==> x.prarent_left >=id.parent_left && x.parent_left <= id.parent_right , 求x(的集合)。 为了形象的说明,我们一步步来: 首先,模 阅读全文
posted @ 2014-08-05 19:05 tommy.yu 阅读(1549) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-08-05 16:55 tommy.yu 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 命令记录: 其中配置虚拟主机: 查看日志:cat /var/log/apache2/error.log#查看错误日志(apache2的安装查看这里:http://blog.csdn.net/lion_awake/article/details/38069833) 阅读全文
posted @ 2014-07-31 20:58 tommy.yu 阅读(216) 评论(0) 推荐(0) 编辑
摘要: ubuntu:12.04 (32bit) djangocms 0.5.1 首先,跟着这个做: https://github.com/divio/django-cms-tutorial/ 期间,碰到了问题,pip无法下载,需要添加镜像,添加文件 /root/.pip/pip.conf ,内容如下: [ 阅读全文
posted @ 2014-07-30 17:04 tommy.yu 阅读(962) 评论(0) 推荐(0) 编辑
摘要: pycharm 社区版: 3.4 1. checkout 项目 注意,之前配置好:设置里面的一些配置:(以下勾勾不要勾上) 2. checkout 项目之后,做以下操作: vcs ->enable subversion version control (这步很关键,否则无法在pycharm里面che 阅读全文
posted @ 2014-07-28 19:03 tommy.yu 阅读(6085) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2014-07-25 15:52 tommy.yu 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 要用python链接到数据库,又不想写太多代码。想到了django,就偷懒了下。用django.db直连。 django版本:1.6.5 (1.5以后可以用以下代码) 1.5 以前如此配置 : 阅读全文
posted @ 2014-07-25 11:30 tommy.yu 阅读(973) 评论(0) 推荐(0) 编辑
摘要: 在启动文件里面加入 import sysreload(sys) sys.setdefaultencoding('GB2312') 这样在windows下调试运行神马的,就不会报错了。 当然发布时,建议改回 utf-8 阅读全文
posted @ 2014-07-20 15:44 tommy.yu 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 我们通常都在一个很狭隘的世界里。 却以为我们有了整个蓝天。 阅读全文
posted @ 2014-07-17 11:47 tommy.yu 阅读(217) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14