会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
yingzi__block
学如逆水行舟,不进则退
博客园
首页
新随笔
联系
订阅
管理
2020年10月12日
报错:AssertionError: `basename` argument not specified, and could not automatically determine the name from the viewset, as it does not have a `.queryset` attribute.
摘要: 写一些公共接口时,报错: 经排查发现: 当viewset中没有定义queryset字段时在路由的注册必须加上basename: 例如:在views.py这种,定义了queryset字段 class PwdConfigViewSet(component_viewsets.ModelViewSet):
阅读全文
posted @ 2020-10-12 10:12 yingzi__block
阅读(3188)
评论(0)
推荐(1)
公告