From cb67ad382898969ec68efadf1ff050161eb6095f Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Thu, 8 Aug 2019 16:24:04 +0600 Subject: [PATCH] added indelx.html to the external doc url --- readthedocs/builds/models.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/readthedocs/builds/models.py b/readthedocs/builds/models.py index ce5d5459588..1ddd93fcc57 100644 --- a/readthedocs/builds/models.py +++ b/readthedocs/builds/models.py @@ -278,12 +278,11 @@ def get_absolute_url(self): # TODO: We can integrate them into the resolver # but this is much simpler to handle since we only link them a couple places for now if self.type == EXTERNAL: - url = f'{settings.EXTERNAL_VERSION_URL}/html/' \ - f'{self.project.slug}/{self.slug}/' # Django's static file serving doesn't automatically append index.html - if settings.DEBUG: - url += 'index.html' + url = f'{settings.EXTERNAL_VERSION_URL}/html/' \ + f'{self.project.slug}/{self.slug}/index.html' return url + if not self.built and not self.uploaded: return reverse( 'project_version_detail',