Skip to content

Commit fa0826f

Browse files
committed
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 12a5e04
2 parents c5dc71b + 12a5e04 commit fa0826f

3 files changed

Lines changed: 54 additions & 1 deletion

File tree

ietf/doc/views_doc.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,12 @@ def document_main(request, name, rev=None):
438438
# Do not show the Auth48 URL in the "Additional URLs" section
439439
additional_urls = doc.documenturl_set.exclude(tag_id='auth48')
440440

441+
# Stream description passing test
442+
if doc.stream != None:
443+
stream_desc = doc.stream.desc
444+
else:
445+
stream_desc = "(None)"
446+
441447
return render(request, "doc/document_draft.html",
442448
dict(doc=doc,
443449
group=group,
@@ -447,6 +453,7 @@ def document_main(request, name, rev=None):
447453
split_content=split_content,
448454
revisions=revisions,
449455
snapshot=snapshot,
456+
stream_desc=stream_desc,
450457
latest_revision=latest_revision,
451458
latest_rev=latest_rev,
452459
can_edit=can_edit,
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright The IETF Trust 2019-2021, All Rights Reserved
2+
# -*- coding: utf-8 -*-
3+
4+
from django.db import migrations
5+
6+
7+
def forward(apps, schema_editor):
8+
# Change the StreamName descriptions to match what appears in modern RFCs
9+
StreamName = apps.get_model('name', 'StreamName')
10+
for streamName in StreamName.objects.all():
11+
if streamName.name == "IETF":
12+
streamName.desc = "Internent Engineering Task Force (IETF)"
13+
elif streamName.name == "IRTF":
14+
streamName.desc = "Internet Research Task Force (IRTF)"
15+
elif streamName.name == "IAB":
16+
streamName.desc = "Internet Architecture Board (IAB)"
17+
elif streamName.name == "ISE":
18+
streamName.desc = "Independent Submission"
19+
streamName.save()
20+
21+
22+
def reverse(apps, schema_editor):
23+
StreamName = apps.get_model('name', 'StreamName')
24+
for streamName in StreamName.objects.all():
25+
if streamName.name == "IETF":
26+
streamName.desc = "IETF stream"
27+
elif streamName.name == "IRTF":
28+
streamName.desc = "IRTF Stream"
29+
elif streamName.name == "IAB":
30+
streamName.desc = "IAB stream"
31+
elif streamName.name == "ISE":
32+
streamName.desc = "Independent Submission Editor stream"
33+
streamName.save()
34+
35+
class Migration(migrations.Migration):
36+
37+
dependencies = [
38+
('name', '0022_add_liaison_contact_rolenames'),
39+
]
40+
41+
operations = [
42+
migrations.RunPython(forward,reverse),
43+
44+
]
45+

ietf/templates/doc/document_draft.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@
166166
{% endif %}
167167
</td>
168168
<td>
169-
{{ doc.stream|default:"(None)" }}
169+
{# {{ doc.stream|default:"(None)" }} #}
170+
{{ stream_desc }}
170171
</td>
171172
</tr>
172173

0 commit comments

Comments
 (0)