feat: iab workshops (#6684)
* feat: iab workshops * chore: keep names fixture up to date
This commit is contained in:
parent
8bd5d9481f
commit
9dec409b41
|
@ -11,7 +11,7 @@ register = template.Library()
|
||||||
|
|
||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
def active_groups_menu(flavor):
|
def active_groups_menu(flavor):
|
||||||
parents = GroupTypeName.objects.filter(slug__in=["ag", "area", "rag", "team", "dir", "program"])
|
parents = GroupTypeName.objects.filter(slug__in=["ag", "area", "rag", "team", "dir", "program", "iabworkshop"])
|
||||||
others = []
|
others = []
|
||||||
for group in Group.objects.filter(acronym__in=("rsoc",), state_id="active"):
|
for group in Group.objects.filter(acronym__in=("rsoc",), state_id="active"):
|
||||||
group.menu_url = reverse("ietf.group.views.group_home", kwargs=dict(acronym=group.acronym)) # type: ignore
|
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):
|
||||||
return render_to_string(
|
return render_to_string(
|
||||||
"base/menu_active_groups.html",
|
"base/menu_active_groups.html",
|
||||||
{"parents": parents, "others": others, "flavor": flavor},
|
{"parents": parents, "others": others, "flavor": flavor},
|
||||||
)
|
)
|
||||||
|
|
34
ietf/group/migrations/0003_iabworkshops.py
Normal file
34
ietf/group/migrations/0003_iabworkshops.py
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Copyright The IETF Trust 2023, All Rights Reserved
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
def forward(apps, schema_editor):
|
||||||
|
GroupFeatures = apps.get_model("group", "GroupFeatures")
|
||||||
|
GroupTypeName = apps.get_model("name", "GroupTypeName")
|
||||||
|
|
||||||
|
iabworkshop = GroupFeatures.objects.create(
|
||||||
|
type_id="iabworkshop",
|
||||||
|
need_parent=True,
|
||||||
|
default_parent="iab",
|
||||||
|
has_documents=True,
|
||||||
|
has_session_materials=True,
|
||||||
|
has_meetings=True,
|
||||||
|
has_default_chat=True,
|
||||||
|
session_purposes='["regular"]',
|
||||||
|
)
|
||||||
|
iabworkshop.parent_types.add(GroupTypeName.objects.get(slug="ietf"))
|
||||||
|
|
||||||
|
|
||||||
|
def reverse(apps, schema_editor):
|
||||||
|
GroupFeatures = apps.get_model("group", "GroupFeatures")
|
||||||
|
GroupFeatures.objects.filter(type="iabworkshop").delete()
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("group", "0002_appeal"),
|
||||||
|
("name", "0009_iabworkshops"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(forward, reverse)
|
||||||
|
]
|
|
@ -71,7 +71,7 @@ class GroupPagesTests(TestCase):
|
||||||
self.assertContains(r, group.name)
|
self.assertContains(r, group.name)
|
||||||
self.assertContains(r, escape(group.ad_role().person.name))
|
self.assertContains(r, escape(group.ad_role().person.name))
|
||||||
|
|
||||||
for t in ('rg','area','ag', 'rag', 'dir','review','team','program','iabasg','adm','rfcedtyp'): # See issue 5120
|
for t in ('rg','area','ag', 'rag', 'dir','review','team','program','iabasg','iabworkshop','adm','rfcedtyp'): # See issue 5120
|
||||||
g = GroupFactory.create(type_id=t,state_id='active')
|
g = GroupFactory.create(type_id=t,state_id='active')
|
||||||
if t in ['dir','review']:
|
if t in ['dir','review']:
|
||||||
g.parent = GroupFactory.create(type_id='area',state_id='active')
|
g.parent = GroupFactory.create(type_id='area',state_id='active')
|
||||||
|
@ -87,7 +87,7 @@ class GroupPagesTests(TestCase):
|
||||||
self.assertContains(r, "Directorate")
|
self.assertContains(r, "Directorate")
|
||||||
self.assertContains(r, "AG")
|
self.assertContains(r, "AG")
|
||||||
|
|
||||||
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):
|
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):
|
||||||
with self.assertRaises(NoReverseMatch):
|
with self.assertRaises(NoReverseMatch):
|
||||||
url=urlreverse('ietf.group.views.active_groups', kwargs=dict(group_type=slug))
|
url=urlreverse('ietf.group.views.active_groups', kwargs=dict(group_type=slug))
|
||||||
|
|
||||||
|
|
|
@ -291,7 +291,7 @@ def active_groups(request, group_type=None):
|
||||||
return active_dirs(request)
|
return active_dirs(request)
|
||||||
elif group_type == "review":
|
elif group_type == "review":
|
||||||
return active_review_dirs(request)
|
return active_review_dirs(request)
|
||||||
elif group_type in ("program", "iabasg"):
|
elif group_type in ("program", "iabasg","iabworkshop"):
|
||||||
return active_iab(request)
|
return active_iab(request)
|
||||||
elif group_type == "adm":
|
elif group_type == "adm":
|
||||||
return active_adm(request)
|
return active_adm(request)
|
||||||
|
@ -314,6 +314,7 @@ def active_group_types(request):
|
||||||
"area",
|
"area",
|
||||||
"program",
|
"program",
|
||||||
"iabasg",
|
"iabasg",
|
||||||
|
"iabworkshop"
|
||||||
"adm",
|
"adm",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
@ -344,7 +345,7 @@ def active_teams(request):
|
||||||
return render(request, 'group/active_teams.html', {'teams' : teams })
|
return render(request, 'group/active_teams.html', {'teams' : teams })
|
||||||
|
|
||||||
def active_iab(request):
|
def active_iab(request):
|
||||||
iabgroups = Group.objects.filter(type__in=("program","iabasg"), state="active").order_by("-type_id","name")
|
iabgroups = Group.objects.filter(type__in=("program","iabasg","iabworkshop"), state="active").order_by("-type_id","name")
|
||||||
for group in iabgroups:
|
for group in iabgroups:
|
||||||
group.leads = sorted(roles(group, "lead"), key=extract_last_name)
|
group.leads = sorted(roles(group, "lead"), key=extract_last_name)
|
||||||
return render(request, 'group/active_iabgroups.html', {'iabgroups' : iabgroups })
|
return render(request, 'group/active_iabgroups.html', {'iabgroups' : iabgroups })
|
||||||
|
@ -1335,7 +1336,7 @@ def stream_edit(request, acronym):
|
||||||
@cache_control(public=True, max_age=30*60)
|
@cache_control(public=True, max_age=30*60)
|
||||||
@cache_page(30 * 60)
|
@cache_page(30 * 60)
|
||||||
def group_menu_data(request):
|
def group_menu_data(request):
|
||||||
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")
|
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")
|
||||||
|
|
||||||
groups_by_parent = defaultdict(list)
|
groups_by_parent = defaultdict(list)
|
||||||
for g in groups:
|
for g in groups:
|
||||||
|
|
|
@ -3123,6 +3123,45 @@
|
||||||
"model": "group.groupfeatures",
|
"model": "group.groupfeatures",
|
||||||
"pk": "iabasg"
|
"pk": "iabasg"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fields": {
|
||||||
|
"about_page": "ietf.group.views.group_about",
|
||||||
|
"acts_like_wg": false,
|
||||||
|
"admin_roles": "[\n \"chair\"\n]",
|
||||||
|
"agenda_filter_type": "none",
|
||||||
|
"agenda_type": "ietf",
|
||||||
|
"create_wiki": false,
|
||||||
|
"custom_group_roles": false,
|
||||||
|
"customize_workflow": false,
|
||||||
|
"default_parent": "iab",
|
||||||
|
"default_tab": "ietf.group.views.group_about",
|
||||||
|
"default_used_roles": "[]",
|
||||||
|
"docman_roles": "[\n \"ad\",\n \"chair\",\n \"delegate\",\n \"secr\"\n]",
|
||||||
|
"groupman_authroles": "[\n \"Secretariat\"\n]",
|
||||||
|
"groupman_roles": "[\n \"ad\",\n \"chair\"\n]",
|
||||||
|
"has_chartering_process": false,
|
||||||
|
"has_default_chat": true,
|
||||||
|
"has_documents": true,
|
||||||
|
"has_meetings": true,
|
||||||
|
"has_milestones": false,
|
||||||
|
"has_nonsession_materials": false,
|
||||||
|
"has_reviews": false,
|
||||||
|
"has_session_materials": true,
|
||||||
|
"is_schedulable": false,
|
||||||
|
"material_types": "[\n \"slides\"\n]",
|
||||||
|
"matman_roles": "[\n \"ad\",\n \"chair\",\n \"delegate\",\n \"secr\"\n]",
|
||||||
|
"need_parent": true,
|
||||||
|
"parent_types": [
|
||||||
|
"ietf"
|
||||||
|
],
|
||||||
|
"req_subm_approval": false,
|
||||||
|
"role_order": "[\n \"chair\",\n \"secr\",\n \"member\"\n]",
|
||||||
|
"session_purposes": "\"[\\\"regular\\\"]\"",
|
||||||
|
"show_on_agenda": false
|
||||||
|
},
|
||||||
|
"model": "group.groupfeatures",
|
||||||
|
"pk": "iabworkshop"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"about_page": "ietf.group.views.group_about",
|
"about_page": "ietf.group.views.group_about",
|
||||||
|
@ -5054,6 +5093,21 @@
|
||||||
"model": "mailtrigger.mailtrigger",
|
"model": "mailtrigger.mailtrigger",
|
||||||
"pk": "review_completed_httpdir_early"
|
"pk": "review_completed_httpdir_early"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fields": {
|
||||||
|
"cc": [
|
||||||
|
"ietf_last_call",
|
||||||
|
"review_doc_all_parties",
|
||||||
|
"review_doc_group_mail_list"
|
||||||
|
],
|
||||||
|
"desc": "Recipients when a httpdir Last Call review is completed",
|
||||||
|
"to": [
|
||||||
|
"review_team_mail_list"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"model": "mailtrigger.mailtrigger",
|
||||||
|
"pk": "review_completed_httpdir_lc"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"cc": [
|
"cc": [
|
||||||
|
@ -11530,6 +11584,17 @@
|
||||||
"model": "name.grouptypename",
|
"model": "name.grouptypename",
|
||||||
"pk": "iabasg"
|
"pk": "iabasg"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fields": {
|
||||||
|
"desc": "IAB Workshop",
|
||||||
|
"name": "IAB Workshop",
|
||||||
|
"order": 0,
|
||||||
|
"used": true,
|
||||||
|
"verbose_name": "IAB Workshop"
|
||||||
|
},
|
||||||
|
"model": "name.grouptypename",
|
||||||
|
"pk": "iabworkshop"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"desc": "",
|
"desc": "",
|
||||||
|
@ -16562,7 +16627,7 @@
|
||||||
"fields": {
|
"fields": {
|
||||||
"command": "xym",
|
"command": "xym",
|
||||||
"switch": "--version",
|
"switch": "--version",
|
||||||
"time": "2023-08-22T07:09:39.542Z",
|
"time": "2023-11-21T08:09:45.989Z",
|
||||||
"used": true,
|
"used": true,
|
||||||
"version": "xym 0.7.0"
|
"version": "xym 0.7.0"
|
||||||
},
|
},
|
||||||
|
@ -16573,9 +16638,9 @@
|
||||||
"fields": {
|
"fields": {
|
||||||
"command": "pyang",
|
"command": "pyang",
|
||||||
"switch": "--version",
|
"switch": "--version",
|
||||||
"time": "2023-08-22T07:09:39.881Z",
|
"time": "2023-11-21T08:09:46.322Z",
|
||||||
"used": true,
|
"used": true,
|
||||||
"version": "pyang 2.5.3"
|
"version": "pyang 2.6.0"
|
||||||
},
|
},
|
||||||
"model": "utils.versioninfo",
|
"model": "utils.versioninfo",
|
||||||
"pk": 2
|
"pk": 2
|
||||||
|
@ -16584,7 +16649,7 @@
|
||||||
"fields": {
|
"fields": {
|
||||||
"command": "yanglint",
|
"command": "yanglint",
|
||||||
"switch": "--version",
|
"switch": "--version",
|
||||||
"time": "2023-08-22T07:09:39.899Z",
|
"time": "2023-11-21T08:09:46.338Z",
|
||||||
"used": true,
|
"used": true,
|
||||||
"version": "yanglint SO 1.9.2"
|
"version": "yanglint SO 1.9.2"
|
||||||
},
|
},
|
||||||
|
@ -16595,9 +16660,9 @@
|
||||||
"fields": {
|
"fields": {
|
||||||
"command": "xml2rfc",
|
"command": "xml2rfc",
|
||||||
"switch": "--version",
|
"switch": "--version",
|
||||||
"time": "2023-08-22T07:09:40.791Z",
|
"time": "2023-11-21T08:09:47.251Z",
|
||||||
"used": true,
|
"used": true,
|
||||||
"version": "xml2rfc 3.18.0"
|
"version": "xml2rfc 3.18.2"
|
||||||
},
|
},
|
||||||
"model": "utils.versioninfo",
|
"model": "utils.versioninfo",
|
||||||
"pk": 4
|
"pk": 4
|
||||||
|
|
29
ietf/name/migrations/0009_iabworkshops.py
Normal file
29
ietf/name/migrations/0009_iabworkshops.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Copyright The IETF Trust 2023, All Rights Reserved
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
def forward(apps, schema_editor):
|
||||||
|
GroupTypeName = apps.get_model("name", "GroupTypeName")
|
||||||
|
GroupTypeName.objects.create(
|
||||||
|
slug = "iabworkshop",
|
||||||
|
name = "IAB Workshop",
|
||||||
|
desc = "IAB Workshop",
|
||||||
|
used = True,
|
||||||
|
order = 0,
|
||||||
|
verbose_name = "IAB Workshop",
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
def reverse(apps, schema_editor):
|
||||||
|
GroupTypeName = apps.get_model("name", "GroupTypeName")
|
||||||
|
GroupTypeName.objects.filter(slug="iabworkshop").delete()
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("name", "0008_removed_objfalse"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(forward, reverse)
|
||||||
|
]
|
|
@ -65,7 +65,7 @@ urlpatterns = [
|
||||||
url(r'^submit/', include('ietf.submit.urls')),
|
url(r'^submit/', include('ietf.submit.urls')),
|
||||||
url(r'^sync/', include('ietf.sync.urls')),
|
url(r'^sync/', include('ietf.sync.urls')),
|
||||||
url(r'^templates/', include('ietf.dbtemplate.urls')),
|
url(r'^templates/', include('ietf.dbtemplate.urls')),
|
||||||
url(r'^(?P<group_type>(wg|rg|ag|rag|team|dir|review|area|program|iabasg|adhoc|ise|adm|rfcedtyp|edwg|edappr))/', include(grouptype_urls)),
|
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)),
|
||||||
|
|
||||||
# Redirects
|
# Redirects
|
||||||
url(r'^(?P<path>public)/', include('ietf.redirects.urls')),
|
url(r'^(?P<path>public)/', include('ietf.redirects.urls')),
|
||||||
|
|
Loading…
Reference in a new issue