会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
飞翔的浮士德
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
28
下一页
2020年5月12日
python解决高并发思路
摘要: 代码层面 1,开进程池线程池 2,使用协程 3, 异步服务,使用异步的方式来解决耗时任务,例如 asyncio 模块 架构层面 1,使用docker起多个容器 2,使用微服务,例如支付模块访问量大,可以用java或者go来写,只需保证数据库的一致性即可,每个微服务之间的调用使用Json或者xml,此
阅读全文
posted @ 2020-05-12 09:41 夜晚的潜水艇
阅读(554)
评论(0)
推荐(0)
2020年5月9日
后端文件保存的两种方式
摘要: from flask import Flask, request app = Flask(__name__) @app.route('/upload', methods=['POST'])def upload(): file_obj = request.files.get('pic') if fil
阅读全文
posted @ 2020-05-09 13:30 夜晚的潜水艇
阅读(932)
评论(0)
推荐(0)
form表单传值类型
摘要: <form method='post' enctype='multipart/form-data'> # multipart/from-data 指定多媒体类型 <input type='text' name='city'><input type='text' name='age'><input t
阅读全文
posted @ 2020-05-09 11:14 夜晚的潜水艇
阅读(1509)
评论(0)
推荐(0)
2020年4月24日
省市县三级联动数据导入数据库
摘要: 中国行政区域三级联动数据导入数据库脚本 area.py 数据链接github https://github.com/adyliu/china_area/blob/master/area_code_2019.json 部分数据格式 area = [{ "code": 110000000000, "na
阅读全文
posted @ 2020-04-24 12:01 夜晚的潜水艇
阅读(1120)
评论(0)
推荐(0)
2020年3月29日
python dict 以key名 去重运算
摘要: 将日期相同的数据统计在一起a_count = [ {'create_time': '2020-03-05', 'total_len': 1, 'count_invite': 1}, {'create_time': '2020-03-11', 'total_len': 2, 'count_invite
阅读全文
posted @ 2020-03-29 23:13 夜晚的潜水艇
阅读(305)
评论(0)
推荐(0)
django orm 查询一个月内每天的数据
摘要: 查询一个月内每天的查询人数 from django.db.models import Count data = ApplicationForm.objects.filter(create_time__year=year, create_time__month=month).extra( select
阅读全文
posted @ 2020-03-29 23:01 夜晚的潜水艇
阅读(1580)
评论(0)
推荐(0)
2020年3月5日
序列化第三张表的数据
摘要: import logging import re import json import datetime # from cryptography.utils import cached_property from django.utils.functional import cached_prope
阅读全文
posted @ 2020-03-05 13:25 夜晚的潜水艇
阅读(209)
评论(0)
推荐(0)
2020年3月3日
阿里云对象存储oss操作使用
该文被密码保护。
阅读全文
posted @ 2020-03-03 18:02 夜晚的潜水艇
阅读(1)
评论(0)
推荐(0)
raise 常用抛错类型
该文被密码保护。
阅读全文
posted @ 2020-03-03 11:22 夜晚的潜水艇
阅读(0)
评论(0)
推荐(0)
2020年2月27日
Celery用户指引--Workers启动、重启
摘要: Celery用户指引–Workers启动、重启 1.启动worker 通过下面的命令在前台启动worker $ celery -A proj worker -l info 1 通过下面的命令查看worker命令的所有相关选项 $ celery worker --help 1 你也可以在同一台机器上启
阅读全文
posted @ 2020-02-27 11:53 夜晚的潜水艇
阅读(4727)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
28
下一页
公告