Fixed an issue where the https: schema inadvertently had been included in RFCDIFF_PREFIX, causing duplicate schema specifications in some places. Changed name to RFCDIFF_BASE_URL and cleaned out the duplicate schema specifiers.
- Legacy-Id: 9593
This commit is contained in:
parent
606637247d
commit
8365a36c2f
|
@ -6,8 +6,8 @@ from ietf import __date__, __rev__, __version__, __id__
|
||||||
def server_mode(request):
|
def server_mode(request):
|
||||||
return {'server_mode': settings.SERVER_MODE}
|
return {'server_mode': settings.SERVER_MODE}
|
||||||
|
|
||||||
def rfcdiff_prefix(request):
|
def rfcdiff_base_url(request):
|
||||||
return {'rfcdiff_prefix': settings.RFCDIFF_PREFIX}
|
return {'rfcdiff_base_url': settings.RFCDIFF_BASE_URL}
|
||||||
|
|
||||||
def revision_info(request):
|
def revision_info(request):
|
||||||
return {'revision_time': __date__[7:32], 'revision_date': __date__[7:17], 'revision_num': __rev__[6:-2], "revision_id": __id__[5:-2], "version_num": __version__ }
|
return {'revision_time': __date__[7:32], 'revision_date': __date__[7:17], 'revision_num': __rev__[6:-2], "revision_id": __id__[5:-2], "version_num": __version__ }
|
||||||
|
|
|
@ -247,7 +247,7 @@ def add_links_in_new_revision_events(doc, events, diff_revisions):
|
||||||
links += ""
|
links += ""
|
||||||
|
|
||||||
if prev != None:
|
if prev != None:
|
||||||
links += ' (<a href="https:%s?url1=%s&url2=%s">diff from previous</a>)' % (settings.RFCDIFF_PREFIX, urllib.quote(prev, safe="~"), urllib.quote(diff_url, safe="~"))
|
links += ' (<a href="%s?url1=%s&url2=%s">diff from previous</a>)' % (settings.RFCDIFF_BASE_URL, urllib.quote(prev, safe="~"), urllib.quote(diff_url, safe="~"))
|
||||||
|
|
||||||
# replace the bold filename part
|
# replace the bold filename part
|
||||||
e.desc = re.sub(r"<b>(.+-[0-9][0-9].txt)</b>", links, e.desc)
|
e.desc = re.sub(r"<b>(.+-[0-9][0-9].txt)</b>", links, e.desc)
|
||||||
|
|
|
@ -188,7 +188,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||||
'ietf.context_processors.revision_info',
|
'ietf.context_processors.revision_info',
|
||||||
'ietf.secr.context_processors.secr_revision_info',
|
'ietf.secr.context_processors.secr_revision_info',
|
||||||
'ietf.secr.context_processors.static',
|
'ietf.secr.context_processors.static',
|
||||||
'ietf.context_processors.rfcdiff_prefix',
|
'ietf.context_processors.rfcdiff_base_url',
|
||||||
)
|
)
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
|
@ -276,7 +276,7 @@ INTERNAL_IPS = (
|
||||||
|
|
||||||
# no slash at end
|
# no slash at end
|
||||||
IDTRACKER_BASE_URL = "https://datatracker.ietf.org"
|
IDTRACKER_BASE_URL = "https://datatracker.ietf.org"
|
||||||
RFCDIFF_PREFIX = "https://www.ietf.org/rfcdiff"
|
RFCDIFF_BASE_URL = "https://www.ietf.org/rfcdiff"
|
||||||
|
|
||||||
# Valid values:
|
# Valid values:
|
||||||
# 'production', 'test', 'development'
|
# 'production', 'test', 'development'
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
{% if diff_revisions and diff_revisions|length > 1 %}
|
{% if diff_revisions and diff_revisions|length > 1 %}
|
||||||
<h2>Revision differences</h2>
|
<h2>Revision differences</h2>
|
||||||
|
|
||||||
<form class="form-horizontal diff-form" role="form" action="{{rfcdiff_prefix}}" method="get" target="_blank">
|
<form class="form-horizontal diff-form" role="form" action="{{rfcdiff_base_url}}" method="get" target="_blank">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-2 ">
|
<div class="col-sm-2 ">
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
{% if doc.latest_revision_date|timesince_days|new_enough:request and doc.get_state_slug != "rfc" %}<a href="{{ rfcdiff_prefix }}?url2={{ doc.name }}-{{ doc.rev }}">{% endif %}{% if doc.get_state_slug == "rfc" %}{{ doc.latest_revision_date|date:"Y-m" }}{% else %}{{ doc.latest_revision_date|date:"Y-m-d" }}{% endif %}{% if doc.latest_revision_date|timesince_days|new_enough:request %}{% if doc.get_state_slug != "rfc" %}</a>{% endif %}
|
{% if doc.latest_revision_date|timesince_days|new_enough:request and doc.get_state_slug != "rfc" %}<a href="{{ rfcdiff_base_url }}?url2={{ doc.name }}-{{ doc.rev }}">{% endif %}{% if doc.get_state_slug == "rfc" %}{{ doc.latest_revision_date|date:"Y-m" }}{% else %}{{ doc.latest_revision_date|date:"Y-m-d" }}{% endif %}{% if doc.latest_revision_date|timesince_days|new_enough:request %}{% if doc.get_state_slug != "rfc" %}</a>{% endif %}
|
||||||
<wbr><span class="label label-success">New</span>
|
<wbr><span class="label label-success">New</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ The IETF datatracker page for this Internet-Draft is:
|
||||||
https://datatracker.ietf.org/doc/{{ submission.name }}/
|
https://datatracker.ietf.org/doc/{{ submission.name }}/
|
||||||
|
|
||||||
Diff from previous version:
|
Diff from previous version:
|
||||||
https:{{rfcdiff_prefix}}?url2={{ submission.name }}-{{ submission.rev }}
|
{{rfcdiff_base_url}}?url2={{ submission.name }}-{{ submission.rev }}
|
||||||
|
|
||||||
Please note that it may take a couple of minutes from the time of submission
|
Please note that it may take a couple of minutes from the time of submission
|
||||||
until the htmlized version and diff are available at tools.ietf.org.
|
until the htmlized version and diff are available at tools.ietf.org.
|
||||||
|
|
|
@ -12,7 +12,7 @@ Pages: {{ submission.pages }}
|
||||||
URL: https://www.ietf.org/internet-drafts/{{ submission.name }}-{{ submission.rev }}.txt
|
URL: https://www.ietf.org/internet-drafts/{{ submission.name }}-{{ submission.rev }}.txt
|
||||||
Status: https://datatracker.ietf.org/doc/{{ submission.name }}/
|
Status: https://datatracker.ietf.org/doc/{{ submission.name }}/
|
||||||
Htmlized: https://tools.ietf.org/html/{{ submission.name }}-{{ submission.rev }}
|
Htmlized: https://tools.ietf.org/html/{{ submission.name }}-{{ submission.rev }}
|
||||||
{% if submission.rev != "00" %}Diff: https:{{rfcdiff_prefix}}?url2={{ submission.name }}-{{ submission.rev }}{% endif %}
|
{% if submission.rev != "00" %}Diff: {{rfcdiff_base_url}}?url2={{ submission.name }}-{{ submission.rev }}{% endif %}
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
{{ submission.abstract }}
|
{{ submission.abstract }}
|
||||||
|
|
|
@ -19,7 +19,7 @@ There's also a htmlized version available at:
|
||||||
https://tools.ietf.org/html/{{ submission.name }}-{{ submission.rev }}
|
https://tools.ietf.org/html/{{ submission.name }}-{{ submission.rev }}
|
||||||
{% if submission.rev != "00" %}
|
{% if submission.rev != "00" %}
|
||||||
A diff from the previous version is available at:
|
A diff from the previous version is available at:
|
||||||
https:{{settings.RFCDIFF_PREFIX}}?url2={{ submission.name }}-{{ submission.rev }}
|
{{settings.RFCDIFF_BASE_URL}}?url2={{ submission.name }}-{{ submission.rev }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
Please note that it may take a couple of minutes from the time of submission
|
Please note that it may take a couple of minutes from the time of submission
|
||||||
|
|
Loading…
Reference in a new issue