Django学习问题汇总
2016-12-16 22:37
323 查看
1、错误信息:You’re using the Django “sites framework” without having set the SITE_ID setting. Create a site in your database and set the SITE_ID setting to fix this error.
原因:settings.py里# Application definition中添加了’django.contrib.sites’模块后需要设置SITE_ID
处理:在settings.py里添加配置:SITE_ID = 1
2、安装django 1.10.4后执行python manage.py runserver后提示错误信息:RuntimeError: maximum recursion depth exceeded while calling a Python object
File “D:\Python27\lib\functools.py”, line 56, in
convert = { ‘_lt_’ : [( ‘_gt_’ , lambda self , other : other < self ), ( ‘_le_’ , lambda self , other : not other < self ), ( ‘_ge_’ , lambda self , other : not self < other )], ‘_le_’ : [( ‘_ge_’ , lambda self , other : other <= self ), ( ‘_lt_’ , lambda self , other : not other <= self ), ( ‘_gt_’ , lambda self , other : not self <= other )], ‘_gt_’ : [( ‘_lt_’ , lambda self , other : other > self ), ( ‘_ge_’ , lambda self , other : not other > self ), ( ‘_le_’ , lambda self , other : not self > other )], ‘_ge_’ : [( ‘_le_’ , lambda self , other : other >= self ), ( ‘_gt_’ , lambda self , other : not other >= self ), ( ‘_lt_’ , lambda self , other : not self >= other )] }
改成以下内容:
convert = { ‘_lt_’ : [( ‘_gt_’ , lambda self , other : not ( self < other or self == other )), ( ‘_le_’ , lambda self , other : self < other or self == other ), ( ‘_ge_’ , lambda self , other : not self < other )], ‘_le_’ : [( ‘_ge_’ , lambda self , other : not self <= other or self == other ), ( ‘_lt_’ , lambda self , other : self <= other and not self == other ), ( ‘_gt_’ , lambda self , other : not self <= other )], ‘_gt_’ : [( ‘_lt_’ , lambda self , other : not ( self > other or self == other )), ( ‘_ge_’ , lambda self , other : self > other or self == other ), ( ‘_le_’ , lambda self , other : not self > other )], ‘_ge_’ : [( ‘_le_’ , lambda self , other : ( not self >= other ) or self == other ), ( ‘_gt_’ , lambda self , other : self >= other and not self == other ), ( ‘_lt_’ , lambda self , other : not self >= other )] }
原因:settings.py里# Application definition中添加了’django.contrib.sites’模块后需要设置SITE_ID
处理:在settings.py里添加配置:SITE_ID = 1
2、安装django 1.10.4后执行python manage.py runserver后提示错误信息:RuntimeError: maximum recursion depth exceeded while calling a Python object
File “D:\Python27\lib\functools.py”, line 56, in
convert = { ‘_lt_’ : [( ‘_gt_’ , lambda self , other : other < self ), ( ‘_le_’ , lambda self , other : not other < self ), ( ‘_ge_’ , lambda self , other : not self < other )], ‘_le_’ : [( ‘_ge_’ , lambda self , other : other <= self ), ( ‘_lt_’ , lambda self , other : not other <= self ), ( ‘_gt_’ , lambda self , other : not self <= other )], ‘_gt_’ : [( ‘_lt_’ , lambda self , other : other > self ), ( ‘_ge_’ , lambda self , other : not other > self ), ( ‘_le_’ , lambda self , other : not self > other )], ‘_ge_’ : [( ‘_le_’ , lambda self , other : other >= self ), ( ‘_gt_’ , lambda self , other : not other >= self ), ( ‘_lt_’ , lambda self , other : not self >= other )] }
改成以下内容:
convert = { ‘_lt_’ : [( ‘_gt_’ , lambda self , other : not ( self < other or self == other )), ( ‘_le_’ , lambda self , other : self < other or self == other ), ( ‘_ge_’ , lambda self , other : not self < other )], ‘_le_’ : [( ‘_ge_’ , lambda self , other : not self <= other or self == other ), ( ‘_lt_’ , lambda self , other : self <= other and not self == other ), ( ‘_gt_’ , lambda self , other : not self <= other )], ‘_gt_’ : [( ‘_lt_’ , lambda self , other : not ( self > other or self == other )), ( ‘_ge_’ , lambda self , other : self > other or self == other ), ( ‘_le_’ , lambda self , other : not self > other )], ‘_ge_’ : [( ‘_le_’ , lambda self , other : ( not self >= other ) or self == other ), ( ‘_gt_’ , lambda self , other : self >= other and not self == other ), ( ‘_lt_’ , lambda self , other : not self >= other )] }
相关文章推荐
- Django学习/问题汇总
- Django_学习问题汇总
- Expression Studio和Silverlight学习资源、安装问题汇总
- [导入]ASP.NET 3.5 Extensions、Expression Studio和Silverlight、IE 8 Preview 发布及学习资源、安装问题汇总
- 学习linux小问题解决汇总
- OpenGL学习中遇到的问题汇总
- 【WebGoat 学习笔记】--3.试用中出现的问题汇总及解决办法
- DIV CSS网页布局学习中容易出现的问题汇总
- Linux学习问题解决方案汇总:
- vim学习笔记-问题与技巧汇总
- 【C++学习笔记】问题汇总
- VC++6.0&&VS2008&MFC&API学习问题总结(一)(多线程CreateThread及小问题汇总)
- 学习动态网页PHP技术常见问题汇总解答
- 我在学习Jquery遇到的问题汇总
- ASP.NET 3.5 Extensions、Expression Studio和Silverlight、IE 8 Preview 发布及学习资源、安装问题汇总
- Python-Django学习中遇到的两个小问题
- 学习WEB标准化一段时间来问题汇总
- Expression Studio和Silverlight学习资源、安装问题汇总
- django学习记录,动态url,另外发现django的时区问题
- 【WebGoat 学习笔记】--3.试用中出现的问题汇总及解决办法