随笔分类 - bug
摘要:UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: QuerySet. paginator = self.django_paginator_class
阅读全文
摘要:TypeError: __init__() missing 1 required positional argument: 'on_delete' 解决: 在django2.0后,定义外键和一对一关系的时候需要加on_delete选项,此参数为了避免两个表里的数据不一致问题,不然会报错: TypeE
阅读全文
摘要:ERROR exception 8 POST 不支持请求中的媒体类型 “text/plain”。 WARNING basehttp 124 "POST /user/login HTTP/1.1" 415 66 解决: 可以看以下Django REST Framework的解析器,django会根据请
阅读全文
摘要:WARNING base 93 Not Found: /user/test/ WARNING basehttp 124 "GET /user/test/ HTTP/1.1" 404 2197 解决: 没配置前端的js 配一下settings就行了
阅读全文
摘要:项目报错: django.db.utils.IntegrityError: (1062, "Duplicate entry '' for key 'mobile'") python创建django后台管理员出现django.db.utils.IntegrityError: (1062, "Dupli
阅读全文
摘要:项目报错: django.core.exceptions.ImproperlyConfigured: The included URLconf 'luffyapi.urls' does not appear to have any patterns in it. If you see valid p
阅读全文