摘要: ImageFieldclassImageField(**kwargs)Default widget:ClearableFileInputEmpty value:Nonenormalizeto: AnUploadedFileobject that wraps the file content and file name into a single object.Validates that file data has been bound to the form, and that the file is of an image format understood by PIL.Error me 阅读全文
posted @ 2011-09-20 10:22 snowlueng 阅读(447) 评论(0) 推荐(0) 编辑
摘要: 而且快下班了,还是晚上再想把。。。 阅读全文
posted @ 2011-09-06 17:52 snowlueng 阅读(115) 评论(0) 推荐(0) 编辑
摘要: unsupported operand type(s) for *: 'float' and 'NoneType'在 * 这个符号不支持float和NoneType运算,多数为左右两边变量有问题(上面这个就是左边float类型,右边NoneType型无法运算)(1062, "Duplicate entry '132' for key 'PRIMARY'")无法重复写入主键为132的 数据,通常是在model.py中写了super.save()方法然后又在save方法中再因为某些逻辑重新super.save()一 阅读全文
posted @ 2011-08-31 22:25 snowlueng 阅读(2107) 评论(0) 推荐(0) 编辑
摘要: django.contrib.admin 管理模块中添加中文记录出错说明.From :http://www.selfcai.com.cn/?p=482查看官方文档.确认是数据库编码问题:http://docs.djangoproject.com/en/1.1/ref/settings/#setting-DEFAULT_CHARSET1.查看本机mysql 数据库的default编码方式 mysql> show variables like ‘%server%’;+———————-+——————-+| Variable_name | Value |+———————-+——————-+| c 阅读全文
posted @ 2011-08-17 13:38 snowlueng 阅读(307) 评论(0) 推荐(0) 编辑
摘要: bash: ./bat: bin/sh: bad interpreter: No such file or directory考,给你3秒钟看看我的有什么错#!bin/shecho 'hello'====================================================没发现???给你看答案# !bin/shecho 'hello' 阅读全文
posted @ 2011-08-16 22:57 snowlueng 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Vimperator是FIREFOX上的VIM插件,很多人都用,但是为什么没有人说怎么去掉?去掉这个和去掉插件是一样的,但是我用的时候就没有找到插件一个项~~~其实是可以的!按一下ESC,到命令模式输入:addons就会打开插件项,UNINSTALL就可以了~~~或者搜索GOOGLE,how to remove Vimperator或者看看这里http://vimperator.org/help/vimperator/tutorial.xhtmlGet me out of here!挨,英文不过关~~~ 阅读全文
posted @ 2011-08-16 21:46 snowlueng 阅读(148) 评论(0) 推荐(0) 编辑
摘要: linq对于有数据实体来说,那就是多余的。可怜啊。linq的意义在什么啊? 阅读全文
posted @ 2011-08-14 12:25 snowlueng 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 其实这只是一个引子,如果园子里有人用emacs的,也想帮我,教我学习怎么用emacs的,希望可以留言帮忙补充完整!!!我刚刚入门,但是觉得这些是必须知道的……参考网址:http://www.allopopo.cn/?p=218谢谢了!杂谈篇:首先,emacs是一个编辑器。它所有内容都写在buffer区,当按保存的时候才会真正写进硬盘。键位篇:打开文件:emacs 文件名 (在terminal中)以下是在emacs中。打开文件:C-x C-f 文件路径 保存文件:C-x C-s退出emacs :C-x C-c查找单词:C-s 单词 查找单词中,不停的使用C-r,C-s可以上下查找单词替换单词:. 阅读全文
posted @ 2011-07-30 22:47 snowlueng 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 不用客气!来wget http://nchc.dl.sourceforge.net/project/vimcdoc/pdf-manual/1.8.0/user_manual.pdf拿去吧,呵呵!一步一步来学习一下VIM怎么用,书就是上面的那本书啦!我是直接看usr_03 移动 这一块的!一边用一边写一下记录!先来几个。w,b,ew就是下一个单词的首,b就是前一个单词的首。e就是下一个单词的尾。$,^,0$就是<end>^就是<home>0也是<home>fx,tx这两个是在同一行内找x,无论怎么都不会超出这一行!%括号匹配!这个是写程序的常用啊!(我老是看到 阅读全文
posted @ 2011-07-25 22:14 snowlueng 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 新开一个终端,对,就是要输入jobs后没有输出的终端。1终止MYSQL服务。sudo killall mysqld2特殊运行MYSQLmysqld_safe --skip-grant-tables &登录mysql -u root设密码 mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> 阅读全文
posted @ 2011-06-29 21:08 snowlueng 阅读(164) 评论(0) 推荐(0) 编辑