8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 19:33:11 +00:00

Pas de cname sur les mx

This commit is contained in:
Gabriel Detraz 2017-01-05 23:48:45 +01:00 committed by root
parent 7ff4cfa570
commit 8c0b84e12a

View file

@ -141,7 +141,11 @@ class MxForm(ModelForm):
class Meta:
model = Mx
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):
mx = forms.ModelMultipleChoiceField(queryset=Mx.objects.all(), label="MX actuels", widget=forms.CheckboxSelectMultiple)