views.py 文件源码

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

项目:tumanov_castleoaks 作者: Roamdev 项目源码 文件源码
def get(self, request, index_name, secret):
        if request.method.lower() == 'head':
            raise Http404

        if secret != conf.SECRET:
            raise Http404

        if index_name not in ALL_INDEXES:
            raise Http404

        cls = ALL_INDEXES[index_name]
        if not issubclass(cls, SphinxXMLIndex):
            raise Http404

        index = cls()
        return StreamingHttpResponse(iter(index), content_type='application/xml')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号