def __init__(self, *args, **kwargs): super(BaseFirewallRuleForm, self).__init__(*args, **kwargs) address_groups_choices = utils.get_address_groups(self.request) self.fields['source_id'] = forms.ChoiceField( label=_("Address Group"), choices=address_groups_choices) self.fields['destination_id'] = forms.ChoiceField( label=_("Address Group"), choices=address_groups_choices)
def __init__(self, *args, **kwargs): super(BaseNetworkAliasForm, self).__init__(*args, **kwargs) group = get_address_groups(self.request) self.fields['group'] = forms.ChoiceField(choices=group)