会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
real-admin
博客园
首页
新随笔
联系
订阅
管理
2020年4月19日
mysql 下载 国内 镜像
摘要: http://mirrors.sohu.com/mysql/ http://mirrors.sohu.com/
阅读全文
posted @ 2020-04-19 21:48 real-admin
阅读(3139)
评论(0)
推荐(0)
2020年4月6日
ckeditor
摘要: from io import BytesIO from django.core.files.storage import FileSystemStorage from django.core.files.uploadedfile import InMemoryUploadedFile from PI
阅读全文
posted @ 2020-04-06 23:07 real-admin
阅读(107)
评论(0)
推荐(0)
2019年12月24日
比较时间
摘要: def test(request): t = '2019-12-23 16:25:00' a = datetime.strptime(t, '%Y-%m-%d %H:%M:%S') print(a) print(type(a)) objs = Author.objects.filter(time__
阅读全文
posted @ 2019-12-24 00:33 real-admin
阅读(104)
评论(0)
推荐(0)
2019年12月23日
远程获取文件
摘要: # coding:utf-8 import requests import time import os url = "http://file.finance.sina.com.cn/211.154.219.97:9494/MRGG/CNSESH_STOCK/2018/2018-3/2018-03-
阅读全文
posted @ 2019-12-23 01:07 real-admin
阅读(417)
评论(0)
推荐(0)
2019年12月20日
多线程一例
摘要: from concurrent.futures import ThreadPoolExecutor # 导入线程池 from threading import current_thread # 从线程中导入查看当前线程的方法 import time,random pool = ThreadPoolE
阅读全文
posted @ 2019-12-20 00:44 real-admin
阅读(118)
评论(0)
推荐(0)
2019年12月19日
requests
摘要: import requests import time url = 'http://www.google.com.hk' print(time.strftime('%Y-%m-%d %H:%M:%S')) try: html = requests.get(url, timeout=5).text p
阅读全文
posted @ 2019-12-19 01:34 real-admin
阅读(250)
评论(0)
推荐(0)
2019年12月10日
json传递对象字典
摘要: authors = Author.objects.filter(name="小非").first()if authors: print(authors.__dict__) info_dic = authors.__dict__ info_dic.pop("_state") a = json.dump
阅读全文
posted @ 2019-12-10 00:46 real-admin
阅读(575)
评论(0)
推荐(0)
2019年12月5日
pymysql和mysqldb的区别
摘要: 一切情况,优先考虑pymysql,兼容性更好,特殊字符和中文不容易出现乱码。 mysqldb对中文兼容性不好,且对python3.5以后的版本不支持。
阅读全文
posted @ 2019-12-05 00:00 real-admin
阅读(721)
评论(0)
推荐(0)
2019年12月3日
sql
摘要: import pymysql con = pymysql.connect(host="127.0.0.1",user="root",passwd="root",db="test") cursor = con.cursor() sql = "insert into test2(name,gender)
阅读全文
posted @ 2019-12-03 00:23 real-admin
阅读(146)
评论(0)
推荐(0)
2019年11月29日
文件更新
摘要: django 文件更新: 文件更新一定要放到最后,否则文件会丢失! 参考https://blog.csdn.net/weixin_33127753/article/details/88227832 from django.core.files.base import ContentFile file
阅读全文
posted @ 2019-11-29 01:14 real-admin
阅读(281)
评论(0)
推荐(0)
下一页
公告