-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: merge main to release
- Loading branch information
Showing
24 changed files
with
297 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createPinia } from 'pinia' | ||
|
||
export function createPiniaSingleton(){ | ||
window.pinia = window.pinia ?? createPinia() | ||
return window.pinia | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright The IETF Trust 2024, All Rights Reserved | ||
|
||
from django.db import migrations | ||
|
||
|
||
def forward(apps, schema_editor): | ||
State = apps.get_model("doc", "State") | ||
State.objects.get_or_create( | ||
type_id="bofreq", | ||
slug="spam", | ||
defaults={"name": "Spam", "desc": "The BOF request is spam", "order": 5}, | ||
) | ||
|
||
|
||
def reverse(apps, schema_editor): | ||
State = apps.get_model("doc", "State") | ||
Document = apps.get_model("doc", "Document") | ||
assert not Document.objects.filter( | ||
states__type="bofreq", states__slug="spam" | ||
).exists() | ||
State.objects.filter(type_id="bofreq", slug="spam").delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("doc", "0022_remove_dochistory_internal_comments_and_more"), | ||
] | ||
|
||
operations = [migrations.RunPython(forward, reverse)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright The IETF Trust 2015-2020, All Rights Reserved | ||
from django import template | ||
from django.conf import settings | ||
from django.template.loader import render_to_string | ||
from ietf.utils.log import log | ||
|
||
register = template.Library() | ||
|
||
|
||
@register.simple_tag | ||
def document_type_badge(doc, snapshot, submission, resurrected_by): | ||
context = {"doc": doc, "snapshot": snapshot, "submission": submission, "resurrected_by": resurrected_by} | ||
if doc.type_id == "rfc": | ||
return render_to_string( | ||
"doc/badge/doc-badge-rfc.html", | ||
context, | ||
) | ||
elif doc.type_id == "draft": | ||
return render_to_string( | ||
"doc/badge/doc-badge-draft.html", | ||
context, | ||
) | ||
else: | ||
error_message = f"Unsupported document type {doc.type_id}." | ||
if settings.SERVER_MODE != 'production': | ||
raise ValueError(error_message) | ||
else: | ||
log(error_message) | ||
return "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.