摘要:
1 ALTER TABLE auth_user RENAME email TO aemail; 阅读全文
摘要:
1 @receiver(post_save, sender=User)2 def create_account(sender, instance=None, **kwargs):3 if instance is None:4 return5 ytuser, creat... 阅读全文
摘要:
一、安装内核aptitude install linux-image-3.13.0-24-generic linux-headers-3.13.0-24-generic二、查看已安装的内核dpkg --get-selections | grep linux-image三、移除不需要的内核sudo a... 阅读全文
摘要:
1 from django.core import serializers2 3 @login_required4 def ajax_get_data(request):5 json_data = serializers.serialize("j... 阅读全文
摘要:
DjangoUeditor 是一个相当赞的django 富文本编辑器,你可以在https://github.com/zhangfisher/DjangoUeditor查看相关信息。我一直想着把DjangoUeditor 的图片和文件存储修改为七牛云存储,但又觉得自己js水平太菜,所以就一直拖延到现在... 阅读全文
摘要:
1 Request Method: GET2 Request URL: http://192.168.128.111:8000/×××/××××/3 Django Version: 1.4.84 Exception Type: TransactionManagementErr... 阅读全文
摘要:
from : https://www.python.org/doc/newstyle/New-style ClassesUnfortunately(遗憾,不幸的), new-style classes have not yet been integrated(集成) into Python's st... 阅读全文
摘要:
1 def __init__(self, *args, **kwargs):2 kwargs['blank'] = True3 if 'default' not in kwargs and not kwargs.get('null'):4 ... 阅读全文
摘要:
class BooleanField(Field): empty_strings_allowed = False default_error_messages = { 'invalid': _(u"'%s' value must be either True or Fals... 阅读全文
摘要:
要分析django的源码,来更深入的学习django,是一个不错的方法,可惜需要大量的时间。所以,能分析多少就是多少吧。本次源码分析以1.4.16为基础。用sublime 打开下载的源码,使用 Find in Folder,查找BigIntegerField在其中可以看到这样的代码:1 1005 ... 阅读全文