Use the id-archive wherever we had been using the id-repository. Fixes #3080. Commit ready for merge.
- Legacy-Id: 18550
This commit is contained in:
parent
6ee63c8a0a
commit
3baea05e6d
|
@ -1,5 +1,6 @@
|
|||
# Copyright The IETF Trust 2007, All Rights Reserved
|
||||
|
||||
from django.conf import settings
|
||||
from django.views.generic import RedirectView
|
||||
from django.http import HttpResponsePermanentRedirect
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
@ -17,5 +18,5 @@ urlpatterns = [
|
|||
url(r'^(?P<name>[^/]+)/(related/)?$', RedirectView.as_view(url='/doc/%(name)s/', permanent=True)),
|
||||
url(r'^wgid/(?P<id>\d+)/$', lambda request, id: HttpResponsePermanentRedirect("/wg/%s/" % get_object_or_404(Group, id=id).acronym)),
|
||||
url(r'^wg/(?P<acronym>[^/]+)/$', RedirectView.as_view(url='/wg/%(acronym)s/', permanent=True)),
|
||||
url(r'^all_id(?:_txt)?.html$', RedirectView.as_view(url='https://www.ietf.org/id/all_id.txt', permanent=True)),
|
||||
url(r'^all_id(?:_txt)?.html$', RedirectView.as_view(url='%s/all_id.txt'%settings.IETF_ID_ARCHIVE_URL, permanent=True)),
|
||||
]
|
||||
|
|
|
@ -248,10 +248,11 @@ def document_main(request, name, rev=None):
|
|||
possible_types = settings.IDSUBMIT_FILE_TYPES
|
||||
found_types = [t for t in possible_types if os.path.exists(base_path + t)]
|
||||
|
||||
if not snapshot and doc.get_state_slug() == "active":
|
||||
base = settings.IETF_ID_URL
|
||||
else:
|
||||
base = settings.IETF_ID_ARCHIVE_URL
|
||||
# if not snapshot and doc.get_state_slug() == "active":
|
||||
# base = settings.IETF_ID_URL
|
||||
# else:
|
||||
# base = settings.IETF_ID_ARCHIVE_URL
|
||||
base = settings.IETF_ID_ARCHIVE_URL
|
||||
|
||||
file_urls = []
|
||||
for t in found_types:
|
||||
|
|
|
@ -140,7 +140,7 @@ OLD_PHOTO_DIRS = [
|
|||
]
|
||||
|
||||
IETF_HOST_URL = 'https://www.ietf.org/'
|
||||
IETF_ID_URL = IETF_HOST_URL + 'id/'
|
||||
IETF_ID_URL = IETF_HOST_URL + 'id/' # currently unused
|
||||
IETF_ID_ARCHIVE_URL = IETF_HOST_URL + 'archive/id/'
|
||||
IETF_AUDIO_URL = IETF_HOST_URL + 'audio/'
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Copyright The IETF Trust 2011-2020, All Rights Reserved
|
||||
from django.urls import reverse as urlreverse
|
||||
from django.contrib import admin
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
from ietf.submit.models import Preapproval, Submission, SubmissionEvent, SubmissionCheck, SubmissionEmailEvent
|
||||
|
@ -21,7 +22,7 @@ class SubmissionAdmin(admin.ModelAdmin):
|
|||
|
||||
def draft_link(self, instance):
|
||||
if instance.state_id == "posted":
|
||||
return '<a href="https://www.ietf.org/id/%s-%s.txt">%s</a>' % (instance.name, instance.rev, instance.name)
|
||||
return '<a href="%s/%s-%s.txt">%s</a>' % (settings.IETF_ID_ARCHIVE_URL,instance.name, instance.rev, instance.name)
|
||||
else:
|
||||
return instance.name
|
||||
draft_link.allow_tags = True # type: ignore # https://github.com/python/mypy/issues/2087
|
||||
|
|
|
@ -351,6 +351,7 @@ class SubmitTests(TestCase):
|
|||
self.assertIn("New Version Notification",outbox[-2]["Subject"])
|
||||
self.assertIn(name, get_payload_text(outbox[-2]))
|
||||
self.assertIn("mars", get_payload_text(outbox[-2]))
|
||||
self.assertIn(settings.IETF_ID_ARCHIVE_URL, get_payload_text(outbox[-2]))
|
||||
# Check "Review of suggested possible replacements for..." mail
|
||||
self.assertIn("review", outbox[-1]["Subject"].lower())
|
||||
self.assertIn(name, get_payload_text(outbox[-1]))
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
|
||||
<p>In addition, the following files are available for download:</p>
|
||||
<ul>
|
||||
<li><a href="https://www.ietf.org/id/1id-index.txt">Active Internet-Drafts (text)</a></li>
|
||||
<li><a href="https://www.ietf.org/id/1id-abstracts.txt">Active Internet-Drafts with abstracts (text)</a></li>
|
||||
<li><a href="https://www.ietf.org/id/all_id2.txt">All Internet-Drafts (tab-separated)</a>, <a href="https://www.ietf.org/id/all_id.txt">older version (with fewer fields)</a></li>
|
||||
<li><a href="{{settings.IETF_ID_ARCHIVE_URL}}1id-index.txt">Active Internet-Drafts (text)</a></li>
|
||||
<li><a href="{{settings.IETF_ID_ARCHIVE_URL}}1id-abstracts.txt">Active Internet-Drafts with abstracts (text)</a></li>
|
||||
<li><a href="{{settings.IETF_ID_ARCHIVE_URL}}all_id2.txt">All Internet-Drafts (tab-separated)</a>, <a href="{{settings.IETF_ID_ARCHIVE_URL}}all_id.txt">older version (with fewer fields)</a></li>
|
||||
<li><a href="https://www.rfc-editor.org/rfc/rfc-index.txt">All RFCs (text)</a></li>
|
||||
<li><a href="https://www.rfc-editor.org/rfc/rfc-index.xml">All RFCs (XML)</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<dt>{{ conflictdoc.stream }} {{ conflictdoc.intended_std_level }}</dt>
|
||||
<dd>
|
||||
<a href="https://www.ietf.org/id/{{ conflictdoc.name }}-{{ conflictdoc.rev }}.txt">
|
||||
<a href="{{settings.IETF_ID_ARCHIVE_URL}}{{ conflictdoc.name }}-{{ conflictdoc.rev }}.txt">
|
||||
<span class="fa fa-file"></span>
|
||||
</a>
|
||||
<a href="{% url "ietf.doc.views_doc.document_main" name=conflictdoc.name %}">{{ conflictdoc.name }}</a>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% autoescape off %}
|
||||
A new version (-{{ submission.rev }}) has been submitted for {{ submission.name }}:
|
||||
https://www.ietf.org/id/{{ submission.name }}-{{ submission.rev }}.txt{% if submission.xml_version == "3" %}
|
||||
https://www.ietf.org/id/{{ submission.name }}-{{ submission.rev }}.html{% endif %}
|
||||
{{settings.IETF_ID_ARCHIVE_URL}}{{ submission.name }}-{{ submission.rev }}.txt{% if submission.xml_version == "3" %}
|
||||
{{settings.IETF_ID_ARCHIVE_URL}}{{ submission.name }}-{{ submission.rev }}.html{% endif %}
|
||||
{% if msg %}
|
||||
{{ msg|striptags }}
|
||||
{% endif %}
|
||||
|
|
|
@ -9,9 +9,9 @@ Title: {{ submission.title }}
|
|||
Document date: {{ submission.document_date|date:"Y-m-d" }}
|
||||
Group: {{ group }}
|
||||
Pages: {{ submission.pages }}
|
||||
URL: https://www.ietf.org/id/{{ submission.name }}-{{ submission.rev }}.txt
|
||||
URL: {{ settings.IETF_ID_ARCHIVE_URL }}{{ submission.name }}-{{ submission.rev }}.txt
|
||||
Status: https://datatracker.ietf.org/doc/{{ submission.name }}/{% if submission.xml_version == "3" %}
|
||||
Html: https://www.ietf.org/id/{{ submission.name }}-{{ submission.rev }}.html{% else %}
|
||||
Html: {{ settings.IETF_ID_ARCHIVE_URL }}{{ submission.name }}-{{ submission.rev }}.html{% else %}
|
||||
Htmlized: https://datatracker.ietf.org/doc/html/{{ submission.name }}{% endif %}
|
||||
Htmlized: https://tools.ietf.org/html/{{ submission.name }}-{{ submission.rev }}
|
||||
{% if submission.rev != "00" %}Diff: {{rfcdiff_base_url}}?url2={{ submission.name }}-{{ submission.rev }}{% endif %}
|
||||
|
|
|
@ -15,8 +15,8 @@ Abstract:
|
|||
The IETF datatracker status page for this draft is:
|
||||
https://datatracker.ietf.org/doc/{{ submission.name }}/
|
||||
{% if submission.xml_version == "3" %}
|
||||
There is also a HTML versions available at:
|
||||
https://www.ietf.org/id/{{ submission.name }}-{{ submission.rev }}.html{% else %}
|
||||
There is also a HTML version available at:
|
||||
{{ settings.IETF_ID_ARCHIVE_URL }}{{ submission.name }}-{{ submission.rev }}.html{% else %}
|
||||
There are also htmlized versions available at:
|
||||
https://tools.ietf.org/html/{{ submission.name }}-{{ submission.rev }}
|
||||
https://datatracker.ietf.org/doc/html/{{ submission.name }}-{{ submission.rev }}{% endif %}
|
||||
|
|
Loading…
Reference in a new issue