Revert "Revert "Don't add index.html onto htmldir docs. Fixes #252.""

This reverts commit 77de795a9c.
rtd2
Eric Holscher 2012-09-26 18:39:02 -07:00
parent 632adce8ee
commit fc902e839f
2 changed files with 4 additions and 3 deletions

View File

@ -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.

View File

@ -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()