Django自定义状态码

class BaseResponse:
    def __init__(self):
        self.code = 1000
        self.data = None
        self.error = None

    @property
    def dict(self):
        return self.__dict__

 

posted @ 2019-10-10 20:25  市丸银  阅读(1298)  评论(0编辑  收藏  举报