CBV&APIView '''原生django as_view方法''' class View(object): http_method_names = ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace'] #用于判断请求方式是否符合http协议规定 @classonlymethod def as_view(cls, **initkwargs): for key in initkwargs: if key in…