Fix docs index filename for old versions

It hasn't always been called index.html, annoyingly enough...

Fixes #109
This commit is contained in:
Magnus Hagander
2011-12-04 14:23:45 +01:00
parent cb8531abbe
commit 37d7c02ae3

View File

@ -32,6 +32,13 @@ def docpage(request, version, typ, filename):
else:
extension = "html"
if ver < Decimal("7.1") and ver > Decimal(0):
indexname = "postgres.htm"
elif ver == Decimal("7.1"):
indexname = "postgres.html"
else:
indexname = "index.html"
page = get_object_or_404(DocPage, version=ver, file="%s.%s" % (filename, extension))
if typ=="interactive":
@ -46,7 +53,7 @@ def docpage(request, version, typ, filename):
'doc_type': typ,
'comments': comments,
'can_comment': (typ=="interactive" and ver==currver),
'doc_index_filename': 'index.html',
'doc_index_filename': indexname,
})
def docsrootpage(request, version, typ):