Finish the poorly-thought-through and poorly-implemented

GroupIETF->IETFWG rename.
 - Legacy-Id: 179
This commit is contained in:
Bill Fenner 2007-05-29 13:39:32 +00:00
parent 380546ac46
commit 0eb450cab7
4 changed files with 10 additions and 10 deletions

View file

@ -1,5 +1,5 @@
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
class IDIndexSearchForm(forms.Form):
@ -13,5 +13,5 @@ class IDIndexSearchForm(forms.Form):
def __init__(self, *args, **kwargs):
super(IDIndexSearchForm, self).__init__(*args, **kwargs)
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()]

View file

@ -4,7 +4,7 @@ from django.db.models import Q
from django.http import Http404
from django.template import RequestContext, Context, loader
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.models import alphabet, orgs, orgs_dict
from ietf.utils import orl, flattenl
@ -13,11 +13,11 @@ base_extra = { 'alphabet': alphabet, 'orgs': orgs }
def wglist(request, wg=None):
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)])
)
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')
return object_list(request, queryset=queryset, template_name='idindex/wglist.html', allow_empty=True, extra_context=base_extra)

View file

@ -1,6 +1,6 @@
from django import newforms as forms
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):
add_edit = forms.ChoiceField(choices=(
@ -52,7 +52,7 @@ class ListReqStep1(forms.Form):
def __init__(self, *args, **kwargs):
dname = kwargs.get('dname', 'ietf.org')
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['domain_name'].initial = dname
def clean_group(self):

View file

@ -1,5 +1,5 @@
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
from ietf.utils import log
@ -48,12 +48,12 @@ class ResolveAcronym(object):
return False
else:
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:
return True
else:
return False
except GroupIETF.DoesNotExist:
except IETFWG.DoesNotExist:
return False
class Meeting(models.Model):