![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
z201323041121
这个作者很懒,什么都没留下…
展开
-
【django】APPEND_SLASH的作用
RuntimeError: You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to 127.0.0.1:8000/user/login/ (note the trailing sla原创 2021-12-25 23:15:52 · 963 阅读 · 0 评论 -
【django】URL末尾的斜线问题
RuntimeError: You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to 127.0.0.1:8000/user/login/ (note the trailing sla原创 2021-12-25 22:23:44 · 882 阅读 · 0 评论 -
python中multiprocessing模块在windows下报错的问题
【问题描述】下面的代码,在Linux中可以正常运行,在windows中却报错。import multiprocessingdef fun(): # 子进程函数 print("子进程执行")p = multiprocessing .Process(target=fun) # 创建进程对象p.start() # 启动进程p.join() # 回收进程【解决方法】根据提示添加代码:if __name__ == '__main__': multiprocess原创 2021-11-15 16:39:06 · 1668 阅读 · 0 评论 -
【python简单技巧】交换变量值
a,b = b,atmp = aa = bb = tmpa = a + bb = a - ba = a - b原创 2020-03-01 14:49:32 · 106 阅读 · 0 评论 -
【python简单应用】猜拳
#猜拳游戏import randomplayer = int(input('请输入:剪刀(0) 石头(1) 布(2):'))computer = random.randint(0,2)if((player == 0) and (computer==2)) or ((player == 1) and (computer==0)) or ((player == 2) and (compute...原创 2020-03-01 14:45:34 · 247 阅读 · 0 评论 -
【python简单应用】计算器
#简易计算器print(eval(input()))#简易计算器num1 = int(input("请输入第一个数:"))operator = input("输入运算符号:")num2 = int(input("请输入第二个数:"))if operator == '+': print(num1+num2)elif operator == '-': print(nu...原创 2020-03-01 10:37:25 · 262 阅读 · 0 评论