码迷,mamicode.com
首页 > 其他好文 > 详细

九个功能视图子类

时间:2019-11-24 17:27:05      阅读:76      评论:0      收藏:0      [点我收藏+]

标签:trie   des   cap   mixin   get   update   delete   eric   视图   

七个功能视图子类

1)CreateAPIView

提供 post 方法

继承自: GenericAPIView、CreateModelMixin

2)ListAPIView

提供 get 方法

继承自:GenericAPIView、ListModelMixin

3)RetrieveAPIView

提供 get 方法

继承自: GenericAPIView、RetrieveModelMixin

4)DestoryAPIView

提供 delete 方法

继承自:GenericAPIView、DestoryModelMixin

5)UpdateAPIView

提供 put 和 patch 方法

继承自:GenericAPIView、UpdateModelMixin

6)RetrieveUpdateAPIView

提供 get、put、patch方法

继承自: GenericAPIView、RetrieveModelMixin、UpdateModelMixin

7)RetrieveUpdateDestoryAPIView

提供 get、put、patch、delete方法

继承自:GenericAPIView、RetrieveModelMixin、UpdateModelMixin、DestoryModelMixin

九个功能视图子类

标签:trie   des   cap   mixin   get   update   delete   eric   视图   

原文地址:https://www.cnblogs.com/SkyOceanchen/p/11922975.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!