Skip to content

Commit 9dec409

Browse files
authored
feat: iab workshops (ietf-tools#6684)
* feat: iab workshops * chore: keep names fixture up to date
1 parent 8bd5d94 commit 9dec409

7 files changed

Lines changed: 143 additions & 14 deletions

File tree

ietf/doc/templatetags/active_groups_menu.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
@register.simple_tag
1313
def active_groups_menu(flavor):
14-
parents = GroupTypeName.objects.filter(slug__in=["ag", "area", "rag", "team", "dir", "program"])
14+
parents = GroupTypeName.objects.filter(slug__in=["ag", "area", "rag", "team", "dir", "program", "iabworkshop"])
1515
others = []
1616
for group in Group.objects.filter(acronym__in=("rsoc",), state_id="active"):
1717
group.menu_url = reverse("ietf.group.views.group_home", kwargs=dict(acronym=group.acronym)) # type: ignore
@@ -23,4 +23,4 @@ def active_groups_menu(flavor):
2323
return render_to_string(
2424
"base/menu_active_groups.html",
2525
{"parents": parents, "others": others, "flavor": flavor},
26-
)
26+
)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright The IETF Trust 2023, All Rights Reserved
2+
3+
from django.db import migrations
4+
5+
def forward(apps, schema_editor):
6+
GroupFeatures = apps.get_model("group", "GroupFeatures")
7+
GroupTypeName = apps.get_model("name", "GroupTypeName")
8+
9+
iabworkshop = GroupFeatures.objects.create(
10+
type_id="iabworkshop",
11+
need_parent=True,
12+
default_parent="iab",
13+
has_documents=True,
14+
has_session_materials=True,
15+
has_meetings=True,
16+
has_default_chat=True,
17+
session_purposes='["regular"]',
18+
)
19+
iabworkshop.parent_types.add(GroupTypeName.objects.get(slug="ietf"))
20+
21+
22+
def reverse(apps, schema_editor):
23+
GroupFeatures = apps.get_model("group", "GroupFeatures")
24+
GroupFeatures.objects.filter(type="iabworkshop").delete()
25+
26+
class Migration(migrations.Migration):
27+
dependencies = [
28+
("group", "0002_appeal"),
29+
("name", "0009_iabworkshops"),
30+
]
31+
32+
operations = [
33+
migrations.RunPython(forward, reverse)
34+
]

ietf/group/tests_info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_active_groups(self):
7171
self.assertContains(r, group.name)
7272
self.assertContains(r, escape(group.ad_role().person.name))
7373

74-
for t in ('rg','area','ag', 'rag', 'dir','review','team','program','iabasg','adm','rfcedtyp'): # See issue 5120
74+
for t in ('rg','area','ag', 'rag', 'dir','review','team','program','iabasg','iabworkshop','adm','rfcedtyp'): # See issue 5120
7575
g = GroupFactory.create(type_id=t,state_id='active')
7676
if t in ['dir','review']:
7777
g.parent = GroupFactory.create(type_id='area',state_id='active')
@@ -87,7 +87,7 @@ def test_active_groups(self):
8787
self.assertContains(r, "Directorate")
8888
self.assertContains(r, "AG")
8989

90-
for slug in GroupTypeName.objects.exclude(slug__in=['wg','rg','ag','rag','area','dir','review','team','program','adhoc','ise','adm','iabasg','rfcedtyp', 'edwg', 'edappr']).values_list('slug',flat=True):
90+
for slug in GroupTypeName.objects.exclude(slug__in=['wg','rg','ag','rag','area','dir','review','team','program','adhoc','ise','adm','iabasg','iabworkshop','rfcedtyp', 'edwg', 'edappr']).values_list('slug',flat=True):
9191
with self.assertRaises(NoReverseMatch):
9292
url=urlreverse('ietf.group.views.active_groups', kwargs=dict(group_type=slug))
9393

ietf/group/views.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def active_groups(request, group_type=None):
291291
return active_dirs(request)
292292
elif group_type == "review":
293293
return active_review_dirs(request)
294-
elif group_type in ("program", "iabasg"):
294+
elif group_type in ("program", "iabasg","iabworkshop"):
295295
return active_iab(request)
296296
elif group_type == "adm":
297297
return active_adm(request)
@@ -314,6 +314,7 @@ def active_group_types(request):
314314
"area",
315315
"program",
316316
"iabasg",
317+
"iabworkshop"
317318
"adm",
318319
]
319320
)
@@ -344,7 +345,7 @@ def active_teams(request):
344345
return render(request, 'group/active_teams.html', {'teams' : teams })
345346

346347
def active_iab(request):
347-
iabgroups = Group.objects.filter(type__in=("program","iabasg"), state="active").order_by("-type_id","name")
348+
iabgroups = Group.objects.filter(type__in=("program","iabasg","iabworkshop"), state="active").order_by("-type_id","name")
348349
for group in iabgroups:
349350
group.leads = sorted(roles(group, "lead"), key=extract_last_name)
350351
return render(request, 'group/active_iabgroups.html', {'iabgroups' : iabgroups })
@@ -1335,7 +1336,7 @@ def stream_edit(request, acronym):
13351336
@cache_control(public=True, max_age=30*60)
13361337
@cache_page(30 * 60)
13371338
def group_menu_data(request):
1338-
groups = Group.objects.filter(state="active", parent__state="active").filter(Q(type__features__acts_like_wg=True)|Q(type_id__in=['program','iabasg'])|Q(parent__acronym='ietfadminllc')|Q(parent__acronym='rfceditor')).order_by("-type_id","acronym")
1339+
groups = Group.objects.filter(state="active", parent__state="active").filter(Q(type__features__acts_like_wg=True)|Q(type_id__in=['program','iabasg','iabworkshop'])|Q(parent__acronym='ietfadminllc')|Q(parent__acronym='rfceditor')).order_by("-type_id","acronym")
13391340

13401341
groups_by_parent = defaultdict(list)
13411342
for g in groups:

ietf/name/fixtures/names.json

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3123,6 +3123,45 @@
31233123
"model": "group.groupfeatures",
31243124
"pk": "iabasg"
31253125
},
3126+
{
3127+
"fields": {
3128+
"about_page": "ietf.group.views.group_about",
3129+
"acts_like_wg": false,
3130+
"admin_roles": "[\n \"chair\"\n]",
3131+
"agenda_filter_type": "none",
3132+
"agenda_type": "ietf",
3133+
"create_wiki": false,
3134+
"custom_group_roles": false,
3135+
"customize_workflow": false,
3136+
"default_parent": "iab",
3137+
"default_tab": "ietf.group.views.group_about",
3138+
"default_used_roles": "[]",
3139+
"docman_roles": "[\n \"ad\",\n \"chair\",\n \"delegate\",\n \"secr\"\n]",
3140+
"groupman_authroles": "[\n \"Secretariat\"\n]",
3141+
"groupman_roles": "[\n \"ad\",\n \"chair\"\n]",
3142+
"has_chartering_process": false,
3143+
"has_default_chat": true,
3144+
"has_documents": true,
3145+
"has_meetings": true,
3146+
"has_milestones": false,
3147+
"has_nonsession_materials": false,
3148+
"has_reviews": false,
3149+
"has_session_materials": true,
3150+
"is_schedulable": false,
3151+
"material_types": "[\n \"slides\"\n]",
3152+
"matman_roles": "[\n \"ad\",\n \"chair\",\n \"delegate\",\n \"secr\"\n]",
3153+
"need_parent": true,
3154+
"parent_types": [
3155+
"ietf"
3156+
],
3157+
"req_subm_approval": false,
3158+
"role_order": "[\n \"chair\",\n \"secr\",\n \"member\"\n]",
3159+
"session_purposes": "\"[\\\"regular\\\"]\"",
3160+
"show_on_agenda": false
3161+
},
3162+
"model": "group.groupfeatures",
3163+
"pk": "iabworkshop"
3164+
},
31263165
{
31273166
"fields": {
31283167
"about_page": "ietf.group.views.group_about",
@@ -5054,6 +5093,21 @@
50545093
"model": "mailtrigger.mailtrigger",
50555094
"pk": "review_completed_httpdir_early"
50565095
},
5096+
{
5097+
"fields": {
5098+
"cc": [
5099+
"ietf_last_call",
5100+
"review_doc_all_parties",
5101+
"review_doc_group_mail_list"
5102+
],
5103+
"desc": "Recipients when a httpdir Last Call review is completed",
5104+
"to": [
5105+
"review_team_mail_list"
5106+
]
5107+
},
5108+
"model": "mailtrigger.mailtrigger",
5109+
"pk": "review_completed_httpdir_lc"
5110+
},
50575111
{
50585112
"fields": {
50595113
"cc": [
@@ -11530,6 +11584,17 @@
1153011584
"model": "name.grouptypename",
1153111585
"pk": "iabasg"
1153211586
},
11587+
{
11588+
"fields": {
11589+
"desc": "IAB Workshop",
11590+
"name": "IAB Workshop",
11591+
"order": 0,
11592+
"used": true,
11593+
"verbose_name": "IAB Workshop"
11594+
},
11595+
"model": "name.grouptypename",
11596+
"pk": "iabworkshop"
11597+
},
1153311598
{
1153411599
"fields": {
1153511600
"desc": "",
@@ -16562,7 +16627,7 @@
1656216627
"fields": {
1656316628
"command": "xym",
1656416629
"switch": "--version",
16565-
"time": "2023-08-22T07:09:39.542Z",
16630+
"time": "2023-11-21T08:09:45.989Z",
1656616631
"used": true,
1656716632
"version": "xym 0.7.0"
1656816633
},
@@ -16573,9 +16638,9 @@
1657316638
"fields": {
1657416639
"command": "pyang",
1657516640
"switch": "--version",
16576-
"time": "2023-08-22T07:09:39.881Z",
16641+
"time": "2023-11-21T08:09:46.322Z",
1657716642
"used": true,
16578-
"version": "pyang 2.5.3"
16643+
"version": "pyang 2.6.0"
1657916644
},
1658016645
"model": "utils.versioninfo",
1658116646
"pk": 2
@@ -16584,7 +16649,7 @@
1658416649
"fields": {
1658516650
"command": "yanglint",
1658616651
"switch": "--version",
16587-
"time": "2023-08-22T07:09:39.899Z",
16652+
"time": "2023-11-21T08:09:46.338Z",
1658816653
"used": true,
1658916654
"version": "yanglint SO 1.9.2"
1659016655
},
@@ -16595,9 +16660,9 @@
1659516660
"fields": {
1659616661
"command": "xml2rfc",
1659716662
"switch": "--version",
16598-
"time": "2023-08-22T07:09:40.791Z",
16663+
"time": "2023-11-21T08:09:47.251Z",
1659916664
"used": true,
16600-
"version": "xml2rfc 3.18.0"
16665+
"version": "xml2rfc 3.18.2"
1660116666
},
1660216667
"model": "utils.versioninfo",
1660316668
"pk": 4
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright The IETF Trust 2023, All Rights Reserved
2+
3+
from django.db import migrations
4+
5+
def forward(apps, schema_editor):
6+
GroupTypeName = apps.get_model("name", "GroupTypeName")
7+
GroupTypeName.objects.create(
8+
slug = "iabworkshop",
9+
name = "IAB Workshop",
10+
desc = "IAB Workshop",
11+
used = True,
12+
order = 0,
13+
verbose_name = "IAB Workshop",
14+
15+
)
16+
17+
def reverse(apps, schema_editor):
18+
GroupTypeName = apps.get_model("name", "GroupTypeName")
19+
GroupTypeName.objects.filter(slug="iabworkshop").delete()
20+
21+
22+
class Migration(migrations.Migration):
23+
dependencies = [
24+
("name", "0008_removed_objfalse"),
25+
]
26+
27+
operations = [
28+
migrations.RunPython(forward, reverse)
29+
]

ietf/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
url(r'^submit/', include('ietf.submit.urls')),
6666
url(r'^sync/', include('ietf.sync.urls')),
6767
url(r'^templates/', include('ietf.dbtemplate.urls')),
68-
url(r'^(?P<group_type>(wg|rg|ag|rag|team|dir|review|area|program|iabasg|adhoc|ise|adm|rfcedtyp|edwg|edappr))/', include(grouptype_urls)),
68+
url(r'^(?P<group_type>(wg|rg|ag|rag|team|dir|review|area|program|iabasg|iabworkshop|adhoc|ise|adm|rfcedtyp|edwg|edappr))/', include(grouptype_urls)),
6969

7070
# Redirects
7171
url(r'^(?P<path>public)/', include('ietf.redirects.urls')),

0 commit comments

Comments
 (0)