摘要: # 只要是继承ViewSetMixin的视图类,路由写法都变了:as_view({字典}) # 重点;以后视图类中可以写任意的方法,只需要继承ViewSetMixin后,使用路由做映射即可 # 路由使用的第一种方式: from rest_framework.viewsets import Model 阅读全文
posted @ 2021-12-23 22:24 甜甜de微笑 阅读(146) 评论(0) 推荐(0) 编辑