Merged in [18862] from peter@akayla.com:

Modifies stream name descriptions and changes document page to use the description instead of the stream name. Fixes issue 3169.
 - Legacy-Id: 18879
Note: SVN reference [18862] has been migrated to Git commit 12a5e04689
This commit is contained in:
Robert Sparks 2021-03-02 23:33:48 +00:00
commit fa0826f860
3 changed files with 54 additions and 1 deletions

View file

@ -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,

View file

@ -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),
]

View file

@ -166,7 +166,8 @@
{% endif %}
</td>
<td>
{{ doc.stream|default:"(None)" }}
{# {{ doc.stream|default:"(None)" }} #}
{{ stream_desc }}
</td>
</tr>