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')
评论列表
文章目录