上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 21 下一页
摘要: 前提条件 不是所有的字段类型都能排序,只有下面两种类型可以 1.数字 2.日期 排序查询 sort 1.降序 desc GET zhifou/doc/_search { "query": { "match": { "from": "gu" } }, "sort": [ { "age": { "ord 阅读全文
posted @ 2020-02-02 18:05 s686编程传 阅读(1779) 评论(0) 推荐(0) 编辑
摘要: 一.match 查询 1.match 之 match (按条件查询) GET zhifou/doc/_search { "query": { "match": { "from": "gu" } } } 2.match 之 match_all (查询全部) GET zhifou/doc/_search 阅读全文
posted @ 2020-02-02 18:00 s686编程传 阅读(365) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/liuweida/p/11717683.html 阅读全文
posted @ 2020-01-16 00:13 s686编程传 阅读(76) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/lzss/p/12168521.html 阅读全文
posted @ 2020-01-15 23:38 s686编程传 阅读(109) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/cainingning/p/9556642.html https://www.cnblogs.com/hanshanxiaoheshang/p/9540759.html 阅读全文
posted @ 2020-01-15 23:20 s686编程传 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1.设置过期时间 redis有四种命令可以用于设置键的生存时间和过期时间 EXPIRE <KEY> <TTL> : 将键的生存时间设为 ttl 秒 PEXPIRE <KEY> <TTL> :将键的生存时间设为 ttl 毫秒 EXPIREAT <KEY> <timestamp> :将键的过期时间设为 阅读全文
posted @ 2020-01-11 17:13 s686编程传 阅读(4736) 评论(0) 推荐(0) 编辑
摘要: Django的缓存配置提供了6种方式,如下: 1 1.开发者调试缓存(此模式为开发调试使用,实际上不执行任何操作) 2 CACHES = { 3 'default': { 4 'BACKEND': 'django.core.cache.backends.locmem.DummyCache', # 指 阅读全文
posted @ 2020-01-02 14:06 s686编程传 阅读(438) 评论(0) 推荐(0) 编辑
摘要: 1.入口: django.views.generic.list import ListView 2.继承关系 3.ContextMixin 4.MultipleObjectMixin 5.BaseListView 这里主要实现了get请求的方法。注意这里的render_to_response是Tem 阅读全文
posted @ 2020-01-02 13:44 s686编程传 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 1.入口:wsgi.py 2.WSGIHandler类 实例化调用__init__方法 3.父类 BaseHandler 中的 load_middleware()方法 4.判断settings中MIDDLEWARE是否为空 一般我们的中间件不为空 走else分支 5.上图中 self._get_re 阅读全文
posted @ 2020-01-01 20:29 s686编程传 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 1.执行python manage.py runserver 127.0.0.1:8000 命令 入口 manage.py 2. 进入django.core.management __init__.py ManagementUtility类 3.执行execute()方法 这是整个流程的关键点 代码 阅读全文
posted @ 2020-01-01 19:33 s686编程传 阅读(811) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 21 下一页