8000 fix: redundant word in banner for Legacy stream documents by richsalz · Pull Request #7207 · ietf-tools/datatracker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: redundant word in banner for Legacy stream documents #7207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions ietf/doc/views_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,12 +603,7 @@ def document_main(request, name, rev=None, document_html=False):
additional_urls = doc.documenturl_set.exclude(tag_id='auth48')

# Stream description and name passing test
if doc.stream != None:
stream_desc = doc.stream.desc
stream = "draft-stream-" + doc.stream.slug
else:
stream_desc = "(None)"
stream = "(None)"
stream = ("draft-stream-" + doc.stream.slug) if doc.stream != None else "(None)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "is not None" instead of "!= None"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are seven "!= None" and four "is not None" in the file. Let me know if you want to standardize on one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should definitely be is not None (citation: https://peps.python.org/pep-0008/#programming-recommendations)

We're not obsessively zealous about it, but I try to rephrase things as I encounter them and it'd be great if you don't mind cleaning these up!


html = None
js = None
Expand Down Expand Up @@ -647,7 +642,6 @@ def document_main(request, name, rev=None, document_html=False):
revisions=simple_diff_revisions if document_html else revisions,
snapshot=snapshot,
stream=stream,
stream_desc=stream_desc,
latest_revision=latest_revision,
latest_rev=latest_rev,
can_edit=can_edit,
Expand Down
2 changes: 1 addition & 1 deletion ietf/name/fixtures/names.json
Original file line number Diff line number Diff line change
Expand Up @@ -14058,7 +14058,7 @@
},
{
"fields": {
"desc": "Legacy stream",
"desc": "Legacy",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't actually change production. it will show up here as a side-effect of the change in the database instead. The PR will need a data migration to change the name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. It will take me a few days to re-understand the migration stuff. If you want to add a commit or hints to me, feel free. (Not asking, just not wanting to be a blocker if I don't have to be)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, this can wait awhile

"name": "Legacy",
"order": 6,
"used": true
Expand Down
21 changes: 21 additions & 0 deletions ietf/name/migrations/0014_change_legacy_stream_desc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright The IETF Trust 2024, All Rights Reserved

from django.db import migrations

def forward(apps, schema_editor):
StreamName = apps.get_model("name", "StreamName")
StreamName.objects.filter(pk="legacy").update(desc="Legacy")

def reverse(apps, schema_editor):
StreamName = apps.get_model("name", "StreamName")
StreamName.objects.filter(pk="legacy").update(desc="Legacy stream")

class Migration(migrations.Migration):

dependencies = [
("name", "0013_narrativeminutes"),
]

operations = [
migrations.RunPython(forward, reverse)
]
2 changes: 1 addition & 1 deletion ietf/secr/templates/telechat/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h2 id="writeup">Ballot Writeup</h2>
<h2 id="downrefs">Downward References</h2>
{% for ref in downrefs %}
<p>Add {{ref.target.name}}
({{ref.target.std_level}} - {{ref.target.stream.desc}})
({{ref.target.std_level}} - {{ref.target.stream.desc}} stream)
to downref registry.<br>
{% if not ref.target.std_level %}
+++ Warning: The standards level has not been set yet!!!<br>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/mail/last_call_announcement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ No IPR declarations have been submitted directly on this I-D.
{% if downrefs %}
The document contains these normative downward references.
See RFC 3967 for additional information:
{% for ref in downrefs %} {{ref.target.name}}: {{ref.target.title}} ({{ref.target.std_level}} - {{ref.target.stream.desc}})
{% for ref in downrefs %} {{ref.target.name}}: {{ref.target.title}} ({{ref.target.std_level}} - {{ref.target.stream.desc}} stream)
{% endfor %}{%endif%}

{% endautoescape %}
Loading
0