Lufer

  • 首页
  • 编程
  • 学习笔记
  • 日常折腾
Lufer
Code the World
  1. 首页
  2. 编程
  3. Python
  4. 正文

Django 项目初始化坑

2018年1月19日 411点热度 0人点赞 0条评论
  1. PIP的安装
先安装setup tools
下载:https://pypi.python.org/pypi/setuptools#windows-simplified
解压后运行 python setup.py install
然后安装pip
下载:http://pypi.python.org/pypi/pip#downloads
解压后运行 python setup.py install
  1. Mysql-Python

下载exe安装
http://www.codegood.com/archives/129

  1. 递归报错"RuntimeError: maximum recursion depth exceeded in cmp"

找到python\Lib\fuctools.py将

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 Python
最后更新:2023年7月10日

Lufer

新的一天开始啦

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2022 lufer.cc.

Theme Kratos Made By Seaton Jiang

鲁ICP备2021045819号