Пример #1
0
 def __init__(self, case, *args, **kwargs):
     """Constructor"""
     super(forms.Form, self).__init__(*args, **kwargs)
     self.fields['geography'].choices = getGeographyForRelease(case.protocol.release)
     initGeog = self.fields['geography'].choices[0][0]
     self.fields['country'].choices = getCountryForGeography(case.protocol.release, initGeog)
     initCountry = self.fields['country'].choices[0][0]
     self.fields['communicator'].choices = getCommForGeographyAndRelease(case.protocol.release, initCountry)
     initComm = self.fields['communicator'].choices[0][0]
     self.fields['pg_model'].choices = getPGForGeographyAndCommAndRelease(case.protocol.release, initCountry, initComm)
     self.fields['browser'].choices = BROWSER_OPTIONS
     self.fields['owner'].choices = getOwnerUsers(team=None)
     self.fields['owner'].initial = case.owner
     self.fields['planned_for'].choices = getPlannedForChoices(case.protocol.release)
     self.fields['country_ignore'].initial = True
Пример #2
0
 def __init__(self, release, *args, **kwargs):
     """Constructor"""
     super(forms.Form, self).__init__(*args, **kwargs)
     self.fields['geography'].choices = getGeographyForRelease(release)