Revert "Revert "Don't add index.html onto htmldir docs. Fixes #252.""
This reverts commit 77de795a9c
.
rtd2
parent
632adce8ee
commit
fc902e839f
|
@ -302,7 +302,7 @@ class SearchView(TemplateView):
|
|||
context['results'] = self.results
|
||||
context['count'] = len(self.results) # causes solr request #2
|
||||
return context
|
||||
|
||||
|
||||
def get(self, request, **kwargs):
|
||||
"""
|
||||
Performing the search causes three requests to be sent to Solr.
|
||||
|
|
|
@ -166,9 +166,10 @@ def subdomain_handler(request, lang_slug=None, version_slug=None, filename=''):
|
|||
|
||||
This was made primarily to redirect old subdomain's to their version'd brothers.
|
||||
"""
|
||||
if not filename:
|
||||
filename = "index.html"
|
||||
project = get_object_or_404(Project, slug=request.slug)
|
||||
# Don't add index.html for htmldir.
|
||||
if not filename and project.documentation_type != 'sphinx_htmldir':
|
||||
filename = "index.html"
|
||||
if version_slug is None:
|
||||
#Handle / on subdomain.
|
||||
default_version = project.get_default_version()
|
||||
|
|
Loading…
Reference in New Issue