Finish the poorly-thought-through and poorly-implemented
GroupIETF->IETFWG rename. - Legacy-Id: 179
This commit is contained in:
parent
380546ac46
commit
0eb450cab7
|
@ -1,5 +1,5 @@
|
||||||
from django import newforms as forms
|
from django import newforms as forms
|
||||||
from ietf.idtracker.models import IDState, IDStatus, GroupIETF
|
from ietf.idtracker.models import IDState, IDStatus, IETFWG
|
||||||
from ietf.idindex.models import orgs
|
from ietf.idindex.models import orgs
|
||||||
|
|
||||||
class IDIndexSearchForm(forms.Form):
|
class IDIndexSearchForm(forms.Form):
|
||||||
|
@ -13,5 +13,5 @@ class IDIndexSearchForm(forms.Form):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(IDIndexSearchForm, self).__init__(*args, **kwargs)
|
super(IDIndexSearchForm, self).__init__(*args, **kwargs)
|
||||||
self.fields['id_tracker_state_id'].choices = [('', 'All/Any')] + IDState.choices()
|
self.fields['id_tracker_state_id'].choices = [('', 'All/Any')] + IDState.choices()
|
||||||
self.fields['wg_id'].choices = [('', 'All/Any')] + GroupIETF.choices()
|
self.fields['wg_id'].choices = [('', 'All/Any')] + IETFWG.choices()
|
||||||
self.fields['status_id'].choices = [('', 'All/Any')] + [(status.status_id, status.status) for status in IDStatus.objects.all()]
|
self.fields['status_id'].choices = [('', 'All/Any')] + [(status.status_id, status.status) for status in IDStatus.objects.all()]
|
||||||
|
|
|
@ -4,7 +4,7 @@ from django.db.models import Q
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from django.template import RequestContext, Context, loader
|
from django.template import RequestContext, Context, loader
|
||||||
from django.shortcuts import render_to_response
|
from django.shortcuts import render_to_response
|
||||||
from ietf.idtracker.models import Acronym, GroupIETF, InternetDraft
|
from ietf.idtracker.models import Acronym, IETFWG, InternetDraft
|
||||||
from ietf.idindex.forms import IDIndexSearchForm
|
from ietf.idindex.forms import IDIndexSearchForm
|
||||||
from ietf.idindex.models import alphabet, orgs, orgs_dict
|
from ietf.idindex.models import alphabet, orgs, orgs_dict
|
||||||
from ietf.utils import orl, flattenl
|
from ietf.utils import orl, flattenl
|
||||||
|
@ -13,11 +13,11 @@ base_extra = { 'alphabet': alphabet, 'orgs': orgs }
|
||||||
|
|
||||||
def wglist(request, wg=None):
|
def wglist(request, wg=None):
|
||||||
if wg == 'other':
|
if wg == 'other':
|
||||||
queryset = GroupIETF.objects.filter(
|
queryset = IETFWG.objects.filter(
|
||||||
orl([Q(group_acronym__acronym__istartswith="%d" % i) for i in range(0,10)])
|
orl([Q(group_acronym__acronym__istartswith="%d" % i) for i in range(0,10)])
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
queryset = GroupIETF.objects.filter(group_acronym__acronym__istartswith=wg)
|
queryset = IETFWG.objects.filter(group_acronym__acronym__istartswith=wg)
|
||||||
queryset = queryset.filter(group_type__type='WG').select_related().order_by('g_status.status', 'acronym.acronym')
|
queryset = queryset.filter(group_type__type='WG').select_related().order_by('g_status.status', 'acronym.acronym')
|
||||||
return object_list(request, queryset=queryset, template_name='idindex/wglist.html', allow_empty=True, extra_context=base_extra)
|
return object_list(request, queryset=queryset, template_name='idindex/wglist.html', allow_empty=True, extra_context=base_extra)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from django import newforms as forms
|
from django import newforms as forms
|
||||||
from models import NonWgMailingList, ImportedMailingList
|
from models import NonWgMailingList, ImportedMailingList
|
||||||
from ietf.idtracker.models import PersonOrOrgInfo, GroupIETF, Acronym
|
from ietf.idtracker.models import PersonOrOrgInfo, IETFWG, Acronym
|
||||||
|
|
||||||
class NonWgStep1(forms.Form):
|
class NonWgStep1(forms.Form):
|
||||||
add_edit = forms.ChoiceField(choices=(
|
add_edit = forms.ChoiceField(choices=(
|
||||||
|
@ -52,7 +52,7 @@ class ListReqStep1(forms.Form):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
dname = kwargs.get('dname', 'ietf.org')
|
dname = kwargs.get('dname', 'ietf.org')
|
||||||
super(ListReqStep1, self).__init__(*args, **kwargs)
|
super(ListReqStep1, self).__init__(*args, **kwargs)
|
||||||
self.fields['group'].choices = [('', '-- Select Working Group')] + GroupIETF.choices()
|
self.fields['group'].choices = [('', '-- Select Working Group')] + IETFWG.choices()
|
||||||
self.fields['list_to_close'].choices = [('', '-- Select List To Close')] + ImportedMailingList.choices(dname)
|
self.fields['list_to_close'].choices = [('', '-- Select List To Close')] + ImportedMailingList.choices(dname)
|
||||||
self.fields['domain_name'].initial = dname
|
self.fields['domain_name'].initial = dname
|
||||||
def clean_group(self):
|
def clean_group(self):
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from ietf.idtracker.models import Acronym, PersonOrOrgInfo, IRTF, AreaGroup
|
from ietf.idtracker.models import Acronym, PersonOrOrgInfo, IRTF, AreaGroup, IETFWG
|
||||||
import datetime
|
import datetime
|
||||||
from ietf.utils import log
|
from ietf.utils import log
|
||||||
|
|
||||||
|
@ -48,12 +48,12 @@ class ResolveAcronym(object):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
g_type_id = GroupIETF.objects.get(pk=self.group_acronym_id).group_type_id == 1
|
g_type_id = IETFWG.objects.get(pk=self.group_acronym_id).group_type_id == 1
|
||||||
if g_type_id == 1:
|
if g_type_id == 1:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
except GroupIETF.DoesNotExist:
|
except IETFWG.DoesNotExist:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
class Meeting(models.Model):
|
class Meeting(models.Model):
|
||||||
|
|
Loading…
Reference in a new issue