Modifies stream name descriptions and changes document page to use the description instead of the stream name. Fixes issue 3169. Commit ready for merge.
- Legacy-Id: 18862
This commit is contained in:
parent
cc65d97563
commit
12a5e04689
|
@ -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,
|
||||
|
|
45
ietf/name/migrations/0023_change_stream_descriptions.py
Normal file
45
ietf/name/migrations/0023_change_stream_descriptions.py
Normal 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),
|
||||
|
||||
]
|
||||
|
|
@ -166,7 +166,8 @@
|
|||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ doc.stream|default:"(None)" }}
|
||||
{# {{ doc.stream|default:"(None)" }} #}
|
||||
{{ stream_desc }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
Loading…
Reference in a new issue