会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Blueherb
In solitude, where we are least alone
奏乐乐章
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
6
下一页
2019年12月21日
UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'courses.models.Video'> QuerySet.
摘要: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: QuerySet. paginator = self.django_paginator_class
阅读全文
posted @ 2019-12-21 21:14 奏乐乐章
阅读(572)
评论(0)
推荐(0)
2019年12月19日
TypeError: __init__() missing 1 required positional argument: 'on_delete'
摘要: TypeError: __init__() missing 1 required positional argument: 'on_delete' 解决: 在django2.0后,定义外键和一对一关系的时候需要加on_delete选项,此参数为了避免两个表里的数据不一致问题,不然会报错: TypeE
阅读全文
posted @ 2019-12-19 15:36 奏乐乐章
阅读(860)
评论(0)
推荐(0)
2019年12月18日
WARNING basehttp 124 "POST /user/login HTTP/1.1" 415 66
摘要: ERROR exception 8 POST 不支持请求中的媒体类型 “text/plain”。 WARNING basehttp 124 "POST /user/login HTTP/1.1" 415 66 解决: 可以看以下Django REST Framework的解析器,django会根据请
阅读全文
posted @ 2019-12-18 21:05 奏乐乐章
阅读(1259)
评论(0)
推荐(0)
WARNING basehttp 124 "GET /user/test/ HTTP/1.1" 404 2197
摘要: WARNING base 93 Not Found: /user/test/ WARNING basehttp 124 "GET /user/test/ HTTP/1.1" 404 2197 解决: 没配置前端的js 配一下settings就行了
阅读全文
posted @ 2019-12-18 20:35 奏乐乐章
阅读(1427)
评论(1)
推荐(0)
2019年12月11日
DRF-JWT
摘要: 1.优点与格式 优点 格式 2.drf jwt插件安装使用 安装 登录 认证 路由与接口测试
阅读全文
posted @ 2019-12-11 22:21 奏乐乐章
阅读(337)
评论(0)
推荐(0)
DRF
摘要: 1.DRF请求模块 2.DRF渲染模块 3.DRF解析模块 服务的对象是数据包数据 4.DRF异常模块: 重写异常模块目的是记录异常信息 5.响应模块
阅读全文
posted @ 2019-12-11 22:20 奏乐乐章
阅读(340)
评论(0)
推荐(0)
2019年12月2日
python创建django后台管理员出现django.db.utils.IntegrityError: (1062, "Duplicate entry '' for key 'mobile'")
摘要: 项目报错: django.db.utils.IntegrityError: (1062, "Duplicate entry '' for key 'mobile'") python创建django后台管理员出现django.db.utils.IntegrityError: (1062, "Dupli
阅读全文
posted @ 2019-12-02 20:01 奏乐乐章
阅读(1595)
评论(0)
推荐(0)
2019年11月27日
django.core.exceptions.ImproperlyConfigured: The included URLconf 'luffyapi.urls' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused
摘要: 项目报错: django.core.exceptions.ImproperlyConfigured: The included URLconf 'luffyapi.urls' does not appear to have any patterns in it. If you see valid p
阅读全文
posted @ 2019-11-27 19:53 奏乐乐章
阅读(2155)
评论(0)
推荐(0)
Serializer组件
摘要: Serializer组件(序列化器 Serializer) 1.定义序列化器 Django REST framework中的Serializer使用类来定义, 需要继承自rest_framework.serializers.Serializer. 序列化 反序列化 2.ModelSerializer
阅读全文
posted @ 2019-11-27 11:48 奏乐乐章
阅读(125)
评论(0)
推荐(0)
drf十大请求
摘要: 1.二次封装Response 2.设置基表 3.ORM多表关联操作: 4.联表序列化 5.子序列化 6.单查群查接口 7.单删群删接口 8.单增群增接口 9.单群整体改 10.单群局部改 11.需要注意
阅读全文
posted @ 2019-11-27 11:46 奏乐乐章
阅读(182)
评论(0)
推荐(0)
1
2
3
4
5
6
下一页
公告