2009年9月10日

摘要: 本地1 ssh-keygen -t rsa2 scp id_rsa.pub user@host:/remote_dir/远程机3 www@orange:~/.ssh$ touch authorized_keys4 www@orange:~/.ssh$ cat ../id_rsa.pub >>authorized_keys5 chmod 400 authorized_keys6 rm ../id_r... 阅读全文
posted @ 2009-09-10 20:48 ddper 阅读(215) 评论(0) 推荐(0) 编辑

2009年8月26日

摘要: 参考资料:http://stackoverflow.com/questions/680770/django-imagefield-not-working-properly-via-modelform两个注意事项:1 f = MyForm(request.POST, request.FILES, instance=myinstance)在实例化Form的时候一定要加上:request.FILES2 ... 阅读全文
posted @ 2009-08-26 17:09 ddper 阅读(191) 评论(0) 推荐(0) 编辑

2009年8月23日

摘要: 参考文档:http://67054.blog.51cto.com/57054/128215在/etc/apt/sources.list 中添加deb http://http.us.debian.org/debian/ stable main更新软件包列表:apt-get update安装apt-spy:apt-get install apt-spy从源上下载一份源的镜像列表:apt-spy upd... 阅读全文
posted @ 2009-08-23 17:17 ddper 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 参考文档:http://www.linuxdiyf.com/viewarticle.php?id=85304 初始文件:# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).# The loopback network interfaceauto loiface lo inet loopback 使用静态IP,加入以下内容(将地址,子网掩码,网关换成你要设定的值)# Stati 阅读全文
posted @ 2009-08-23 16:56 ddper 阅读(208) 评论(0) 推荐(0) 编辑

2009年8月13日

摘要: 比较复杂,而且我没有成功实现的方法:在Django 上使用reCAPTCHA 生成验证码 下面介绍一种简单的方法: 1 下载下面链接中的snippet;http://www.djangosnippets.org/snippets/1644/ 2 把下载下来的文件放到项目的utils文件夹里; 3 forms.py from django import forms from mysite.utils import recaptcha class CommentForm(recaptcha.RecaptchaForm): name = forms.CharField() ... 阅读全文
posted @ 2009-08-13 22:18 ddper 阅读(517) 评论(0) 推荐(0) 编辑

2009年8月11日

摘要: 下文讲的是基本原则:先解码成unicode,在程序中使用unicode,需要输出时再编码。 http://cocre.com/?p=461 下文是全攻略,有原理有实例: http://www.sqlite.com.cn/MySqlite/11/395.Html 下面是一个小的实例,在正则表达式中使用中文: 所有汉字的Unicode编码范围:[\u4e00-\u9fa5] Python中的str对应的范围: Unicode区间:([\xB0-\xF7][\xA1-\xFE])+ 所有GB2312-80编码:([\xA1-\xFE][\xA1-\xFE])+ 所有中文空格:(\xA1\xA1)+ 阅读全文
posted @ 2009-08-11 21:04 ddper 阅读(362) 评论(0) 推荐(0) 编辑

2009年8月7日

摘要: 1 source.list## deb cdrom:[Debian GNU/Linux 5.0.2 _Lenny_ - Official i386 xfce+lxde-CD Binary-1 20090628-15:51]/ lenny maindeb cdrom:[Debian GNU/Linux 5.0.2 _Lenny_ - Official i386 xfce+lxde-CD Binary... 阅读全文
posted @ 2009-08-07 23:22 ddper 阅读(322) 评论(0) 推荐(0) 编辑

2009年8月2日

摘要: http://clemesha.org/blog/2009/jul/05/modern-python-hacker-tools-virtualenv-fabric-pip/virtualenv:用于创建一个隔离的Python环境。Fabric:用于最小化将本地开发的代码部署到远程服务器上这一繁琐的重复性工作。pip:最先进的Python软件包管理工具。使用经验日后奉上。 阅读全文
posted @ 2009-08-02 22:39 ddper 阅读(323) 评论(0) 推荐(0) 编辑

2009年7月27日

摘要: 参考自:http://www.ibm.com/developerworks/cn/web/wa-aj-testing/twill:官网:http://twill.idyll.org/安装:easy_install twill运行:twill-sh文档:http://twill.idyll.org/windmill安装:easy_install windmill使用IE进行测试:windmill i... 阅读全文
posted @ 2009-07-27 20:20 ddper 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2009-07-27 20:17 ddper 阅读(238) 评论(0) 推荐(0) 编辑

导航