diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index a0edacf41..26e0f82b9 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -169,16 +169,14 @@ def doc_canonical_name(name): return "" -def link_charter_doc_match1(match): +def link_charter_doc_match(match): if not doc_canonical_name(match[0]): return match[0] - return f'{match[0]}' - - -def link_charter_doc_match2(match): - if not doc_canonical_name(match[0]): - return match[0] - return f'{match[0]}' + url = urlreverse( + "ietf.doc.views_doc.document_main", + kwargs=dict(name=match[1][:-1], rev=match[2]), + ) + return f'{match[0]}' def link_non_charter_doc_match(match): @@ -187,20 +185,26 @@ def link_non_charter_doc_match(match): if not cname: return match[0] if name == cname: - return f'{match[0]}' + url = urlreverse("ietf.doc.views_doc.document_main", kwargs=dict(name=cname)) + return f'{match[0]}' # if we get here, the name probably has a version number and/or extension at the end rev_split = re.search(r"^(" + re.escape(cname) + r")-(\d{2,})", name) if rev_split: name = rev_split.group(1) else: - return f'{match[0]}' + url = urlreverse("ietf.doc.views_doc.document_main", kwargs=dict(name=cname)) + return f'{match[0]}' cname = doc_canonical_name(name) if not cname: return match[0] if name == cname: - return f'{match[0]}' + url = urlreverse( + "ietf.doc.views_doc.document_main", + kwargs=dict(name=cname, rev=rev_split.group(2)), + ) + return f'{match[0]}' # if we get here, we can't linkify return match[0] @@ -211,44 +215,33 @@ def link_other_doc_match(match): rev = match[3] if not doc_canonical_name(doc + rev): return match[0] - return f'{match[1]}' + url = urlreverse("ietf.doc.views_doc.document_main", kwargs=dict(name=doc + rev)) + return f'{match[1]}' @register.filter(name="urlize_ietf_docs", is_safe=True, needs_autoescape=True) def urlize_ietf_docs(string, autoescape=None): """ - Make occurrences of RFC NNNN and draft-foo-bar links to /doc/. + Make occurrences of RFC NNNN and draft-foo-bar links to the doc pages. """ if autoescape and not isinstance(string, SafeData): if "<" in string: string = escape(string) else: string = mark_safe(string) - exp1 = r"\b(?' + n +'' + names = [f'{n}' for n, __ in names if n not in names_to_skip] categories.append((state, diff --git a/ietf/ietfauth/views.py b/ietf/ietfauth/views.py index fb6c560f1..2660edcc9 100644 --- a/ietf/ietfauth/views.py +++ b/ietf/ietfauth/views.py @@ -744,11 +744,11 @@ def login(request, extra_context=None): logout(request) response = render(request, 'registration/missing_person.html') if require_consent: - messages.warning(request, mark_safe(''' + messages.warning(request, mark_safe(f''' You have personal information associated with your account which is not derived from draft submissions or other ietf work, namely: %s. Please go - to your account profile and review your + to your account profile and review your personal information, then scoll to the bottom and check the 'confirm' checkbox and submit the form, in order to to indicate that that the provided personal information may be used and displayed within the IETF diff --git a/ietf/secr/templates/base_site.html b/ietf/secr/templates/base_site.html index 5a15244ab..d369a40ec 100644 --- a/ietf/secr/templates/base_site.html +++ b/ietf/secr/templates/base_site.html @@ -14,7 +14,7 @@
» View list of timeslot requests
+» View list of timeslot requests
» View list of timeslot requests
+» View list of timeslot requests
diff --git a/ietf/templates/api/index.html b/ietf/templates/api/index.html index a1bc93aec..88d904269 100644 --- a/ietf/templates/api/index.html +++ b/ietf/templates/api/index.html @@ -25,7 +25,7 @@
The API top endpoint is at - https://datatracker.ietf.org/api/v1/. + {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.api.views.top_level' %}. The top endpoint lists inferior endpoints, and thus permits some autodiscovery, but there's really no substitute for looking at the actual ORM model classes. @@ -34,7 +34,7 @@
Documents are listed at - /api/v1/doc/document/. + {% url 'ietf.api.views.top_level' %}/doc/document/.
In general, individual database objects are represented in the API with a path @@ -61,8 +61,8 @@ URL:
- - https://datatracker.ietf.org/api/v1/doc/document/draft-ietf-eppext-keyrelay/ + + {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.api.views.top_level' %}/doc/document/draft-ietf-eppext-keyrelay/
@@ -71,7 +71,7 @@ and a list with one element:
- + api/v1/doc/document/?name=draft-ietf-eppext-keyrelay
@@ -82,13 +82,13 @@states__type__slug__in=draft-rfceditor
states__type__slug__in=draft-iesg
-$ curl 'https://datatracker.ietf.org/api/v1/doc/state/?format=json&limit=0&type__slug__in=draft-rfceditor' -$ curl 'https://datatracker.ietf.org/api/v1/doc/state/?format=json&limit=0&type__slug__in=draft-iesg' -$ curl 'https://datatracker.ietf.org/api/v1/doc/state/?format=json&limit=0&type__slug__in=draft-stream-ietf' +$ curl '{{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.api.views.top_level' %}/doc/state/?format=json&limit=0&type__slug__in=draft-rfceditor' +$ curl '{{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.api.views.top_level' %}/doc/state/?format=json&limit=0&type__slug__in=draft-iesg' +$ curl '{{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.api.views.top_level' %}/doc/state/?format=json&limit=0&type__slug__in=draft-stream-ietf'and then match the listed "resource_uri" of the results to the states listed for each document when you ask for
-$ curl 'https://datatracker.ietf.org/api/v1/doc/document/?limit=0&name__contains=-v6ops-' +$ curl '{{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.api.views.top_level' %}/doc/document/?limit=0&name__contains=-v6ops-'
-$ curl 'https://datatracker.ietf.org/api/v1/doc/document/?limit=0&name__contains=-v6ops-&states__type__slug__in=draft-rfceditor' ... -$ curl 'https://datatracker.ietf.org/api/v1/doc/document/?limit=0&name__contains=-v6ops-&states__type__slug__in=draft-iesg' ... +$ curl '{{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.api.views.top_level' %}/doc/document/?limit=0&name__contains=-v6ops-&states__type__slug__in=draft-rfceditor' ... +$ curl '{{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.api.views.top_level' %}/doc/document/?limit=0&name__contains=-v6ops-&states__type__slug__in=draft-iesg' ...etc.
-$ curl -S -F "apikey=AwAAABVR3D5GHkVMhspKSxBCVknGMmqikNIhT85kSnghjaV_pYy26WV92mm-jpdi" -F "doc=draft-ietf-lamps-eai-addresses" -F "position=noobj" -F "comment=Comment text" https://datatracker.ietf.org/api/iesg/position +$ curl -S -F "apikey=AwAAABVR3D5GHkVMhspKSxBCVknGMmqikNIhT85kSnghjaV_pYy26WV92mm-jpdi" -F "doc=draft-ietf-lamps-eai-addresses" -F "position=noobj" -F "comment=Comment text" {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.doc.views_ballot.api_set_position' %} Done
-$ curl -S -F "apikey=DgAAAMLSi3coaE5TjrRs518xO8eBRlCmFF3eQcC8_SjUTtRGLGiJh7-1SYPT5WiS" -F "meeting=101" -F "group=mptcp" -F "item=1" -F "url=https://foo.example/beer/mptcp" https://datatracker.ietf.org/api/meeting/session/video/url +$ curl -S -F "apikey=DgAAAMLSi3coaE5TjrRs518xO8eBRlCmFF3eQcC8_SjUTtRGLGiJh7-1SYPT5WiS" -F "meeting=101" -F "group=mptcp" -F "item=1" -F "url=https://foo.example/beer/mptcp" {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.meeting.views.api_set_session_video_url' %} Done
{{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.api.urls.oidc_issuer' %}
+ {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.api.urls.oidc_issuer' %}
diff --git a/ietf/templates/base.html b/ietf/templates/base.html index ee38622f7..ea139b7a5 100644 --- a/ietf/templates/base.html +++ b/ietf/templates/base.html @@ -47,7 +47,7 @@ {% if not user.is_authenticated %} + href="{% url 'ietf.ietfauth.views.login' %}?next={{ request.get_full_path|removesuffix:'accounts/logout/'|urlencode }}"> Sign in diff --git a/ietf/templates/base/icons.html b/ietf/templates/base/icons.html index 8087a8e73..4440fb720 100644 --- a/ietf/templates/base/icons.html +++ b/ietf/templates/base/icons.html @@ -9,7 +9,7 @@ - + diff --git a/ietf/templates/base/menu.html b/ietf/templates/base/menu.html index 2d6f53de5..375878df8 100644 --- a/ietf/templates/base/menu.html +++ b/ietf/templates/base/menu.html @@ -236,19 +236,19 @@ {% endif %}
You can also add documents here: diff --git a/ietf/templates/community/notification_email.txt b/ietf/templates/community/notification_email.txt index 56a859caa..bd0b0177f 100644 --- a/ietf/templates/community/notification_email.txt +++ b/ietf/templates/community/notification_email.txt @@ -4,7 +4,7 @@ Hello, This is a notification from the {{ clist.long_name }}. Document: {{ event.doc }}, -https://datatracker.ietf.org/doc/{{ event.doc.name }}/ +{{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.doc.views_doc.document_main' name=event.doc.name %} Change by {{ event.by }} on {{ event.time }}: diff --git a/ietf/templates/cookies/settings.html b/ietf/templates/cookies/settings.html index 620a0b6ce..5ded2f3bd 100644 --- a/ietf/templates/cookies/settings.html +++ b/ietf/templates/cookies/settings.html @@ -21,42 +21,42 @@ {% if new_enough == '7' %} active {% endif %}" - href="/accounts/settings/new_enough/7"> + href="{% url 'ietf.cookies.views.new_enough' days=7 %}"> 7 days + href="{% url 'ietf.cookies.views.new_enough' days=14 %}"> 14 days + href="{% url 'ietf.cookies.views.new_enough' days=21 %}"> 21 days + href="{% url 'ietf.cookies.views.new_enough' days=30 %}"> 30 days + href="{% url 'ietf.cookies.views.new_enough' days=60 %}"> 60 days + href="{% url 'ietf.cookies.views.new_enough' days=90 %}"> 90 days
@@ -69,42 +69,42 @@ {% if expires_soon == '7' %} active {% endif %}" - href="/accounts/settings/expires_soon/7"> + href="{% url 'ietf.cookies.views.expires_soon' days=7 %}"> 7 days + href="{% url 'ietf.cookies.views.expires_soon' days=14 %}"> 14 days + href="{% url 'ietf.cookies.views.expires_soon' days=21 %}"> 21 days + href="{% url 'ietf.cookies.views.expires_soon' days=30 %}"> 30 days + href="{% url 'ietf.cookies.views.expires_soon' days=60 %}"> 60 days + href="{% url 'ietf.cookies.views.expires_soon' days=90 %}"> 90 days @@ -117,14 +117,14 @@ {% if full_draft == 'off' %} active {% endif %}" - href="/accounts/settings/full_draft/off"> + href="{% url 'ietf.cookies.views.full_draft' enabled='off' %}"> Off + href="{% url 'ietf.cookies.views.full_draft' enabled='on' %}"> On @@ -137,15 +137,15 @@ {% if left_menu == 'off' %} active {% endif %}" - href="/accounts/settings/left_menu/off"> + href="{% url 'ietf.cookies.views.left_menu' enabled='off' %}"> Off + href="{% url 'ietf.cookies.views.left_menu' enabled='on' %}"> On -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/ietf/templates/doc/bofreq/bofreq_template.md b/ietf/templates/doc/bofreq/bofreq_template.md index ba3e2f9d5..c6269d7f4 100644 --- a/ietf/templates/doc/bofreq/bofreq_template.md +++ b/ietf/templates/doc/bofreq/bofreq_template.md @@ -30,9 +30,9 @@ To allow evaluation of your proposal, please include the following items: ## Links to the mailing list, draft charter if any, relevant Internet-Drafts, etc. - Mailing List: https://www.ietf.org/mailman/listinfo/example - - Draft charter: https://datatracker.ietf.org/doc/charter-ietf-EXAMPLE/ + - Draft charter: {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.doc.views_doc.document_main' name='charter-ietf-EXAMPLE' %} - Relevant drafts: - Use Cases: - - https://datatracker.ietf.org/html/draft-blah-uses + - {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.doc.views_doc.document_main' name='draft-blah-uses' %} - Solutions - - https://datatracker.ietf.org/html/draft-blah-soln \ No newline at end of file + - {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.doc.views_doc.document_main' name='draft-blah-soln' %} diff --git a/ietf/templates/doc/document_bibtex.bib b/ietf/templates/doc/document_bibtex.bib index 9b511f838..5dda4649e 100644 --- a/ietf/templates/doc/document_bibtex.bib +++ b/ietf/templates/doc/document_bibtex.bib @@ -10,28 +10,28 @@ % actual RFC at https://rfc-editor.org/rfc/rfc{{ doc.rfc_number }}.txt {% endif %} @misc{% templatetag openbrace %}rfc{{ doc.rfc_number }}, - series = {Request for Comments}, - number = {{ doc.rfc_number }}, - howpublished = {% templatetag openbrace %}RFC {{ doc.rfc_number }}{% if doc.doc.intended_std_level %} ({{ doc.intended_std_level }}){% endif %}{% templatetag closebrace %}, - publisher = {RFC Editor}, - doi = {% templatetag openbrace %}{{ doi }}{% templatetag closebrace %}, - url = {% templatetag openbrace %}{{ doc.rfc_number|rfceditor_info_url }}{% templatetag closebrace %},{% else %} + series = {Request for Comments}, + number = {{ doc.rfc_number }}, + howpublished = {% templatetag openbrace %}RFC {{ doc.rfc_number }}{% if doc.doc.intended_std_level %} ({{ doc.intended_std_level }}){% endif %}{% templatetag closebrace %}, + publisher = {RFC Editor}, + doi = {% templatetag openbrace %}{{ doi }}{% templatetag closebrace %}, + url = {% templatetag openbrace %}{{ doc.rfc_number|rfceditor_info_url }}{% templatetag closebrace %},{% else %} {% if published %}%% You should probably cite rfc{{ latest_revision.doc.rfc_number }} instead of this I-D.{% else %}{% if replaced_by %}%% You should probably cite {{replaced_by|join:" or "}} instead of this I-D.{% else %} {% if doc.rev != latest_revision.rev %}%% You should probably cite {{latest_revision.doc.name}}-{{latest_revision.rev}} instead of this revision.{%endif%}{% endif %}{% endif %} @techreport{% templatetag openbrace %}{{doc.name|slice:"6:"}}-{{doc.rev}}, - number = {% templatetag openbrace %}{{doc.name}}-{{doc.rev}}{% templatetag closebrace %}, - type = {% templatetag openbrace %}Internet-Draft{% templatetag closebrace %}, - institution = {% templatetag openbrace %}Internet Engineering Task Force{% templatetag closebrace %}, - publisher = {% templatetag openbrace %}Internet Engineering Task Force{% templatetag closebrace %}, - note = {% templatetag openbrace %}Work in Progress{% templatetag closebrace %}, - url = {% templatetag openbrace %}https://datatracker.ietf.org/doc/html/{{doc.name}}-{{doc.rev}}{% templatetag closebrace %},{% endif %} - author = {% templatetag openbrace %}{% for author in doc.documentauthor_set.all %}{{ author.person.name|texescape}}{% if not forloop.last %} and {% endif %}{% endfor %}{% templatetag closebrace %}, - title = {% templatetag openbrace %}{% templatetag openbrace %}{{doc.title|texescape}}{% templatetag closebrace %}{% templatetag closebrace %}, - pagetotal = {{ doc.pages }}, - year = {{ doc.pub_date.year }}, - month = {{ doc.pub_date|date:"b" }},{% if not doc.rfc_number or doc.pub_date.day == 1 and doc.pub_date.month == 4 %} - day = {{ doc.pub_date.day }},{% endif %} - abstract = {% templatetag openbrace %}{{ doc.abstract|clean_whitespace|texescape }}{% templatetag closebrace %}, + number = {% templatetag openbrace %}{{doc.name}}-{{doc.rev}}{% templatetag closebrace %}, + type = {% templatetag openbrace %}Internet-Draft{% templatetag closebrace %}, + institution = {% templatetag openbrace %}Internet Engineering Task Force{% templatetag closebrace %}, + publisher = {% templatetag openbrace %}Internet Engineering Task Force{% templatetag closebrace %}, + note = {% templatetag openbrace %}Work in Progress{% templatetag closebrace %}, + url = {% templatetag openbrace %}{{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.doc.views_doc.document_main' name=doc.name rev=doc.rev %}{% templatetag closebrace %},{% endif %} + author = {% templatetag openbrace %}{% for author in doc.documentauthor_set.all %}{{ author.person.name|texescape}}{% if not forloop.last %} and {% endif %}{% endfor %}{% templatetag closebrace %}, + title = {% templatetag openbrace %}{% templatetag openbrace %}{{doc.title|texescape}}{% templatetag closebrace %}{% templatetag closebrace %}, + pagetotal = {{ doc.pages }}, + year = {{ doc.pub_date.year }}, + month = {{ doc.pub_date|date:"b" }},{% if not doc.rfc_number or doc.pub_date.day == 1 and doc.pub_date.month == 4 %} + day = {{ doc.pub_date.day }},{% endif %} + abstract = {% templatetag openbrace %}{{ doc.abstract|clean_whitespace|texescape }}{% templatetag closebrace %}, {% templatetag closebrace %} {% endautoescape %} diff --git a/ietf/templates/doc/document_draft.html b/ietf/templates/doc/document_draft.html index a1674c482..22016ab50 100644 --- a/ietf/templates/doc/document_draft.html +++ b/ietf/templates/doc/document_draft.html @@ -74,7 +74,7 @@ {% if draft_name %}You can see the default Working Group I-D State Diagram in - Section 4.1 of RFC6174. + Section 4.1 of RFC6174.
{% endif %}Most of this information can be edited on the individual's - Account Info + Account Info page by the individual after logging in to the account. If the datatracker holds such information about a person, and they don't have an account, a request to diff --git a/ietf/templates/iesg/agenda_conflict_doc.html b/ietf/templates/iesg/agenda_conflict_doc.html index 84aaaf941..ceb84199c 100644 --- a/ietf/templates/iesg/agenda_conflict_doc.html +++ b/ietf/templates/iesg/agenda_conflict_doc.html @@ -49,7 +49,7 @@ {% for ipr in conflictdoc.ipr %} {% if ipr.disclosure.state_id == "posted" %}
{% endif %} {% endfor %} diff --git a/ietf/templates/iesg/agenda_doc.html b/ietf/templates/iesg/agenda_doc.html index 5c5032380..16b223186 100644 --- a/ietf/templates/iesg/agenda_doc.html +++ b/ietf/templates/iesg/agenda_doc.html @@ -87,7 +87,7 @@ {% for ipr in doc.ipr %} {% if ipr.disclosure.state_id == "posted" %} {% endif %} {% endfor %} diff --git a/ietf/templates/iesg/agenda_documents.html b/ietf/templates/iesg/agenda_documents.html index be0110893..1935c44e0 100644 --- a/ietf/templates/iesg/agenda_documents.html +++ b/ietf/templates/iesg/agenda_documents.html @@ -24,13 +24,13 @@ {{ t.pages }} page{{ t.pages|pluralize }}{{ user.username }}
- Edit + Edit-$ curl -S -F "user=user.name@example.com" -F "xml=@~/draft-user-example.xml" https://datatracker.ietf.org/api/submit +$ curl -S -F "user=user.name@example.com" -F "xml=@~/draft-user-example.xml" {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.submit.views.api_submit' %} Upload of draft-user-example OK, confirmation requests sent to: User Name <user.name@example.com>{% endblock %} \ No newline at end of file diff --git a/ietf/templates/submit/tool_instructions.html b/ietf/templates/submit/tool_instructions.html index fd63ce1f9..6a1b2a126 100644 --- a/ietf/templates/submit/tool_instructions.html +++ b/ietf/templates/submit/tool_instructions.html @@ -8,7 +8,7 @@
@@ -30,7 +30,7 @@
An API for automated draft submission is available as an alternative to this webpage at - https://datatracker.ietf.org/api/submit/. + {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.submit.views.api_submit' %}.
The specification for this tool can be found in diff --git a/ietf/templates/utils/merge_person_records.txt b/ietf/templates/utils/merge_person_records.txt index 69c8e7bdd..594811023 100644 --- a/ietf/templates/utils/merge_person_records.txt +++ b/ietf/templates/utils/merge_person_records.txt @@ -16,7 +16,7 @@ Emails: {% if changes %}Changes of special note: {{ changes }}{% endif %} -You can make changes to your profile here: https://datatracker.ietf.org/accounts/profile/ +You can make changes to your profile here: {{ settings.IDTRACKER_BASE_URL }}{% url 'ietf.ietfauth.views.profile' %} Reply to this message if this merge should not have happened, or if it produced an incorrect result that you cannot correct by editing your profile. diff --git a/ietf/templates/utils/personal_information_notice.txt b/ietf/templates/utils/personal_information_notice.txt index 609f95343..379d8e4ef 100644 --- a/ietf/templates/utils/personal_information_notice.txt +++ b/ietf/templates/utils/personal_information_notice.txt @@ -19,7 +19,7 @@ continued maintenance and use of your information by checking the 'Consent' checkbox found at the bottom of the page, and then submit the form. For information on how personal information is handled in the datatracker, please see -{{ settings.IDTRACKER_BASE_URL }}/help/personal-information. +{{ settings.IDTRACKER_BASE_URL }}{% url 'personal-information' %}. In case you prefer to not follow any email links, due to phishing considerations, please just go to the datatracker and use the menu