摘要: 前端:<form method="post" action="./userRegister"> {% csrf_token %} <input type="text" name="email" class="form-control" placeholder="用户名"><br> <input ty 阅读全文
posted @ 2017-11-06 21:05 时间影像 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 新方法连mysql:1.先安装: pip install mysqlclient2.settings.py中 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # 或者使用 mysql.connector.django 阅读全文
posted @ 2017-11-06 21:04 时间影像 阅读(66) 评论(0) 推荐(0) 编辑
摘要: cursor.execute("insert into users set email=%s,pwd=%s,nicheng=%s,createtime=%s",(email,pwd,nicheng,time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time())))) python中时间日期格式化符号: %y 两位数的年份表示(00-9... 阅读全文
posted @ 2017-11-06 21:04 时间影像 阅读(841) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import _thread from time import sleep, ctime def fun1(): sleep(2) print('aaaaaaaaaa') def fun2(): sleep(1) print('bbbbbbbbb') def main(): _thread.star... 阅读全文
posted @ 2017-11-06 21:03 时间影像 阅读(79) 评论(0) 推荐(0) 编辑