From 0eb450cab7f4ef99125b94e59e960d89626b5b8a Mon Sep 17 00:00:00 2001 From: Bill Fenner Date: Tue, 29 May 2007 13:39:32 +0000 Subject: [PATCH] Finish the poorly-thought-through and poorly-implemented GroupIETF->IETFWG rename. - Legacy-Id: 179 --- ietf/idindex/forms.py | 4 ++-- ietf/idindex/views.py | 6 +++--- ietf/mailinglists/forms.py | 4 ++-- ietf/proceedings/models.py | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ietf/idindex/forms.py b/ietf/idindex/forms.py index 2dfa46b9d..6a8db0295 100644 --- a/ietf/idindex/forms.py +++ b/ietf/idindex/forms.py @@ -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()] diff --git a/ietf/idindex/views.py b/ietf/idindex/views.py index 7932ab11a..6d5e12187 100644 --- a/ietf/idindex/views.py +++ b/ietf/idindex/views.py @@ -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) diff --git a/ietf/mailinglists/forms.py b/ietf/mailinglists/forms.py index 7caad75d3..4af2fd882 100644 --- a/ietf/mailinglists/forms.py +++ b/ietf/mailinglists/forms.py @@ -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): diff --git a/ietf/proceedings/models.py b/ietf/proceedings/models.py index 7b06ce4fb..e17bcefdd 100644 --- a/ietf/proceedings/models.py +++ b/ietf/proceedings/models.py @@ -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):