上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 29 下一页
摘要: # 竞价 GET: http://www.xxx.com/deposit/?item_id=1 # 提交竞价 POST: http://www.xxx.com/deposit/ class BidView(ListAPIView, CreateAPIView): queryset = models. 阅读全文
posted @ 2020-03-17 22:44 流年中渲染了微笑 阅读(444) 评论(0) 推荐(0) 编辑
摘要: 一、基本使用 django_celery_demo ├── app01 │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ ├── models.py │ ├── tasks.py │ ├── tests.py │ └─ 阅读全文
posted @ 2020-03-17 15:19 流年中渲染了微笑 阅读(239) 评论(0) 推荐(0) 编辑
摘要: celery,处理任务的Python的模块 对任务进行分发和处理 场景1: 对【耗时的任务】,通过celery,将任务添加到broker(队列),然后立即给用户返回一个任务ID。 当任务添加到broker之后,由worker去broker获取任务并处理任务。 任务弯完成之后,再将结果放到backen 阅读全文
posted @ 2020-03-16 20:24 流年中渲染了微笑 阅读(166) 评论(2) 推荐(0) 编辑
摘要: 结论:在serializer中可以调用request 有下面的接口 class TestSer(serializers.ModelSerializer): xx = serializers.SerializerMethodField() 自定义的字段 class Meta: model = mode 阅读全文
posted @ 2020-03-15 17:21 流年中渲染了微笑 阅读(1241) 评论(0) 推荐(1) 编辑
摘要: 1. 打开码云 登陆 https://gitee.com/ 2. 加号 新建 3. 4. 依照提示一次输入命令即可 阅读全文
posted @ 2020-03-12 00:24 流年中渲染了微笑 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 为将项目的默认配置和本地配置区分开,最常用的做法是增加一个local_settings.py文件 操作如下 SMS = 0 # local_settings配置 ''' 比如在local_settings里有一个SMS=666的配置,我们把代码给 了别人, 别人就不知道哪里有这个啦 所以我们在set 阅读全文
posted @ 2020-03-11 23:56 流年中渲染了微笑 阅读(725) 评论(0) 推荐(0) 编辑
摘要: import os import sys import django base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(base_dir) # 将配置文件的路径写到 DJANG 阅读全文
posted @ 2020-03-11 11:48 流年中渲染了微笑 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 回顾一 APIView 首先说一下序列化 serializers class UserModelSerializer(serializers.Serializer): key = serializers.CharField() cos_path = serializers.CharField()# 阅读全文
posted @ 2020-03-10 22:41 流年中渲染了微笑 阅读(180) 评论(0) 推荐(0) 编辑
摘要: var dataList = ["apple", "orange", "banana"]// 在for循环中 i 是索引 想打印出内容 用闭包 for (var i in dataList) { (function(data){ console.log(data); })(dataList[i]) 阅读全文
posted @ 2020-03-04 16:16 流年中渲染了微笑 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 微信小程序实现登陆页面 实现上面两个页面 第一个页面 <view> <!-- 上侧部分 --> <view class="top-view"> <!-- 用户信息开始 --> <view class="user"> <!-- 头像开始 --> <view class="row"> <image cl 阅读全文
posted @ 2020-02-25 22:18 流年中渲染了微笑 阅读(7687) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 29 下一页