diff --git a/ietf/doc/views_doc.py b/ietf/doc/views_doc.py index b0094781f..0a10faa9c 100644 --- a/ietf/doc/views_doc.py +++ b/ietf/doc/views_doc.py @@ -438,6 +438,12 @@ def document_main(request, name, rev=None): # Do not show the Auth48 URL in the "Additional URLs" section additional_urls = doc.documenturl_set.exclude(tag_id='auth48') + # Stream description passing test + if doc.stream != None: + stream_desc = doc.stream.desc + else: + stream_desc = "(None)" + return render(request, "doc/document_draft.html", dict(doc=doc, group=group, @@ -447,6 +453,7 @@ def document_main(request, name, rev=None): split_content=split_content, revisions=revisions, snapshot=snapshot, + stream_desc=stream_desc, latest_revision=latest_revision, latest_rev=latest_rev, can_edit=can_edit, diff --git a/ietf/name/migrations/0023_change_stream_descriptions.py b/ietf/name/migrations/0023_change_stream_descriptions.py new file mode 100644 index 000000000..e6e578e22 --- /dev/null +++ b/ietf/name/migrations/0023_change_stream_descriptions.py @@ -0,0 +1,45 @@ +# Copyright The IETF Trust 2019-2021, All Rights Reserved +# -*- coding: utf-8 -*- + +from django.db import migrations + + +def forward(apps, schema_editor): + # Change the StreamName descriptions to match what appears in modern RFCs + StreamName = apps.get_model('name', 'StreamName') + for streamName in StreamName.objects.all(): + if streamName.name == "IETF": + streamName.desc = "Internent Engineering Task Force (IETF)" + elif streamName.name == "IRTF": + streamName.desc = "Internet Research Task Force (IRTF)" + elif streamName.name == "IAB": + streamName.desc = "Internet Architecture Board (IAB)" + elif streamName.name == "ISE": + streamName.desc = "Independent Submission" + streamName.save() + + +def reverse(apps, schema_editor): + StreamName = apps.get_model('name', 'StreamName') + for streamName in StreamName.objects.all(): + if streamName.name == "IETF": + streamName.desc = "IETF stream" + elif streamName.name == "IRTF": + streamName.desc = "IRTF Stream" + elif streamName.name == "IAB": + streamName.desc = "IAB stream" + elif streamName.name == "ISE": + streamName.desc = "Independent Submission Editor stream" + streamName.save() + +class Migration(migrations.Migration): + + dependencies = [ + ('name', '0022_add_liaison_contact_rolenames'), + ] + + operations = [ + migrations.RunPython(forward,reverse), + + ] + diff --git a/ietf/templates/doc/document_draft.html b/ietf/templates/doc/document_draft.html index 5d6600e79..1c3f22dc2 100644 --- a/ietf/templates/doc/document_draft.html +++ b/ietf/templates/doc/document_draft.html @@ -166,7 +166,8 @@ {% endif %}