Commit 0d99a382 authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root
Browse files

Pas de cname sur les mx

parent 4ca23b73
...@@ -141,7 +141,11 @@ class MxForm(ModelForm): ...@@ -141,7 +141,11 @@ class MxForm(ModelForm):
class Meta: class Meta:
model = Mx model = Mx
fields = ['zone', 'priority', 'name'] fields = ['zone', 'priority', 'name']
def __init__(self, *args, **kwargs):
super(MxForm, self).__init__(*args, **kwargs)
self.fields['name'].queryset = Domain.objects.exclude(interface_parent=None)
class DelMxForm(ModelForm): class DelMxForm(ModelForm):
mx = forms.ModelMultipleChoiceField(queryset=Mx.objects.all(), label="MX actuels", widget=forms.CheckboxSelectMultiple) mx = forms.ModelMultipleChoiceField(queryset=Mx.objects.all(), label="MX actuels", widget=forms.CheckboxSelectMultiple)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment