摘要: python3 Django 环境下,如果你遇到在根目录下urls.py中的include方法的第二个参数namespace添加之后就出错的问题。请在[app_name]目录下的urls.py中的urlpatterns前面加上app_name='[app_name]', [app_name]代表你的 阅读全文
posted @ 2019-07-23 15:34 红星二锅头 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 安装完 mysql-pyhon 后 还是报错 这个时候可以安装 pymysql 同时在 __init__文件中加入 阅读全文
posted @ 2019-07-02 09:28 红星二锅头 阅读(496) 评论(0) 推荐(0) 编辑
摘要: 依赖文件生成pip freeze > requirements.txt依赖文件安装pip install -r requirement.txt 国内包服务器镜像 豆瓣 https://pypi.douban.com/simple/ 阿里云 http://mirrors.aliyun.com/pypi 阅读全文
posted @ 2019-06-27 09:13 红星二锅头 阅读(1064) 评论(0) 推荐(0) 编辑
摘要: apache2.4 安装环境 vc_redist_x64https://www.apachelounge.com/download/ 安装——打开cmd,进入apache/bin httpd.exe -k install -n "apache2.4" 删除httpd.exe -k uninstall 阅读全文
posted @ 2019-06-26 13:34 红星二锅头 阅读(277) 评论(0) 推荐(0) 编辑
摘要: list = []while True: meus = ("1.查看","2.添加","3.删除","0.退出") print(meus) inputs = input("请选择:") if inputs == "1": print(list) print(" ") elif inputs == " 阅读全文
posted @ 2018-12-08 14:35 红星二锅头 阅读(99) 评论(0) 推荐(0) 编辑
摘要: #pycharm使用小技巧 最近在使用pycharm,所遇到的一些快捷键失效的问题。如ctrl+c,ctrl+v等;包括键入时,总是需要用“i”来实现等问题。 究其缘故,是在安装pycharm时,同时安装了Vim,造成一部分快捷键的粘滞。 ###可通过以下步骤进行修改快捷键的来源####进入file 阅读全文
posted @ 2018-12-07 09:58 红星二锅头 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 1-安装Python3.6.1 Python2.x 与3.x的版本在语法上稍有不同,区别在于输出语句的不同,这个可以看相关的文档。 Python3.6.1,可以在Python的官网上下载:https://www.python.org/downloads/, 安装成功: 下载好之后 直接安装,完了在进 阅读全文
posted @ 2018-05-28 21:57 红星二锅头 阅读(117) 评论(0) 推荐(0) 编辑
摘要: f = open("text.txt","r") user_pass = {} for line in f: u,p = line.split(',') user_pass[u] = p.strip() f = open("lock_a.txt","r") data = f.read() count = 0 lock_a = None sign = True while... 阅读全文
posted @ 2018-04-22 21:48 红星二锅头 阅读(146) 评论(0) 推荐(0) 编辑
摘要: # 可以支持多个用户登录 (提示,通过列表存多个账户信息) uname = ['wps', 'opp' ] pword = ['123','1234'] time = 0 while time < 3: u_name = input("用户名:") if u_name in uname: p_word = input("密码:") if p_wo... 阅读全文
posted @ 2018-04-11 22:55 红星二锅头 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 让用户输入用户名密码 认证成功后显示欢迎信息 输错三次后退出程序 times = 0 while times <= 3: user_a = input("用户名:") password_a = input("密码:") if user_a == "wps" and password_a == "123456": print("欢迎【" + user_a ... 阅读全文
posted @ 2018-04-11 22:54 红星二锅头 阅读(119) 评论(0) 推荐(0) 编辑