Skip to content

Commit

Permalink
Merge pull request #6051 from saadmk11/external-doc-url-fix
Browse files Browse the repository at this point in the history
Add indelx.html filename to the external doc url
  • Loading branch information
ericholscher committed Aug 8, 2019
2 parents e632813 + cb67ad3 commit 7970d0a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions readthedocs/builds/models.py
Expand Up @@ -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',
Expand Down

0 comments on commit 7970d0a

Please sign in to comment.