8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-09 03:16:25 +00:00

Optimisations de chargement

This commit is contained in:
chirac 2017-10-18 17:19:51 +02:00
parent 4143558604
commit 71eed60ad9

View file

@ -296,7 +296,7 @@ class MxForm(ModelForm):
super(MxForm, self).__init__(*args, prefix=prefix, **kwargs) super(MxForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['name'].queryset = Domain.objects.exclude( self.fields['name'].queryset = Domain.objects.exclude(
interface_parent=None interface_parent=None
) ).select_related('extension')
class DelMxForm(Form): class DelMxForm(Form):
@ -309,7 +309,9 @@ class DelMxForm(Form):
class NsForm(ModelForm): class NsForm(ModelForm):
"""Ajout d'un NS pour une zone""" """Ajout d'un NS pour une zone
On exclue les CNAME dans les objets domain (interdit par la rfc)
donc on prend uniquemet """
class Meta: class Meta:
model = Ns model = Ns
fields = ['zone', 'ns'] fields = ['zone', 'ns']
@ -319,7 +321,7 @@ class NsForm(ModelForm):
super(NsForm, self).__init__(*args, prefix=prefix, **kwargs) super(NsForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['ns'].queryset = Domain.objects.exclude( self.fields['ns'].queryset = Domain.objects.exclude(
interface_parent=None interface_parent=None
) ).select_related('extension')
class DelNsForm(Form): class DelNsForm(Form):