Skip to content

Commit 7e84ccc

Browse files
committed
Tweaked the changelog presentation to work irrespective of current directory, and give a sensible 404 if the changelog can't be found.
- Legacy-Id: 4972
1 parent 781403a commit 7e84ccc

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

ietf/release/views.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33

44
from django.template import RequestContext
55
from django.shortcuts import render_to_response
6+
from django.conf import settings
7+
from django.http import Http404
68

79
import changelog
810

911
def release(request, version=None):
1012
entries = {}
11-
log_entries = changelog.parse("changelog")
13+
if os.path.exists(settings.CHANGELOG_PATH):
14+
log_entries = changelog.parse(settings.CHANGELOG_PATH)
15+
else:
16+
raise Http404()
1217
next = None
1318
for entry in log_entries:
1419
if next:

ietf/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@
302302

303303
# Timezone files for iCalendar
304304
TZDATA_ICS_PATH = '/www/ietf-datatracker/tz/ics/'
305+
CHANGELOG_PATH = '/www/ietf-datatracker/web/changelog'
305306

306307
# Put SECRET_KEY in here, or any other sensitive or site-specific
307308
# changes. DO NOT commit settings_local.py to svn.

ietf/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
</div>
7878
<div style="width: 100%; text-align: center; padding-top:4px;font-size:69%;">
7979
{% if version_num %}
80-
<a href="/release/">Version {{ version_num }}, {{revision_date}}</a>
80+
<a href="/release/{{version_num}}/">Version {{ version_num }}, {{revision_date}}</a>
8181
<br/>
8282
{% endif %}
8383
<a href="http://tools.ietf.org/tools/ietfdb/newticket">Report a bug</a>

0 commit comments

Comments
 (0)