摘要: 1 def __init__(self, *args, **kwargs):2 kwargs['blank'] = True3 if 'default' not in kwargs and not kwargs.get('null'):4 ... 阅读全文
posted @ 2014-11-08 02:51 r3call 阅读(3001) 评论(0) 推荐(0) 编辑
摘要: class BooleanField(Field): empty_strings_allowed = False default_error_messages = { 'invalid': _(u"'%s' value must be either True or Fals... 阅读全文
posted @ 2014-11-08 02:29 r3call 阅读(6844) 评论(0) 推荐(1) 编辑
摘要: 要分析django的源码,来更深入的学习django,是一个不错的方法,可惜需要大量的时间。所以,能分析多少就是多少吧。本次源码分析以1.4.16为基础。用sublime 打开下载的源码,使用 Find in Folder,查找BigIntegerField在其中可以看到这样的代码:1 1005 ... 阅读全文
posted @ 2014-11-08 02:06 r3call 阅读(6216) 评论(0) 推荐(0) 编辑