viewsets.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:django-elasticsearch-dsl-drf 作者: barseghyanartur 项目源码 文件源码
def __init__(self, *args, **kwargs):
        assert self.document is not None

        self.client = connections.get_connection()
        self.index = self.document._doc_type.index
        self.mapping = self.document._doc_type.mapping.properties.name
        self.search = Search(using=self.client, index=self.index)
        super(BaseDocumentViewSet, self).__init__(*args, **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号