Add DS records to reverse zone
This commit is contained in:
parent
ef5afbfe3a
commit
39b65ceba0
|
@ -210,7 +210,7 @@ class NameserverForm(MntFormMixin, WhoisObjectFormMixin, forms.ModelForm):
|
|||
return cleaned_data
|
||||
|
||||
|
||||
class ReverseZoneForm(forms.ModelForm):
|
||||
class ReverseZoneForm(DSRecordMixin, forms.ModelForm):
|
||||
prefix = forms.CharField(validators=[IP46CIDRValidator])
|
||||
|
||||
class Meta:
|
||||
|
|
|
@ -13,6 +13,13 @@ import ipaddress
|
|||
# allow owners of a subnet to create reverse dns record?
|
||||
|
||||
|
||||
class DSRecordModelMixin(models.Model):
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
ds_records = models.TextField(blank=True, verbose_name='DS Records',
|
||||
help_text='DS Records in the format of [id] [crypto-algo] [hash-algo] [hash]')
|
||||
|
||||
class Nameserver(MntdObject):
|
||||
handleSuffix = "NS"
|
||||
# dns name
|
||||
|
@ -42,7 +49,7 @@ class Nameserver(MntdObject):
|
|||
return []
|
||||
|
||||
|
||||
class Domain(MntdObject):
|
||||
class Domain(DSRecordModelMixin, MntdObject):
|
||||
handle = None
|
||||
handleSuffix = "DOM"
|
||||
name = models.CharField(max_length=67, unique=True, db_index=True)
|
||||
|
@ -50,9 +57,6 @@ class Domain(MntdObject):
|
|||
nameservers = models.ManyToManyField(Nameserver, blank=True)
|
||||
admin_c = models.ManyToManyField(Contact)
|
||||
|
||||
ds_records = models.TextField(blank=True, verbose_name='DS Records',
|
||||
help_text='DS Records in the format of [id] [crypto-algo] [hash-algo] [hash]')
|
||||
|
||||
def getPK(self):
|
||||
return self.name
|
||||
|
||||
|
@ -85,7 +89,7 @@ class Domain(MntdObject):
|
|||
return name.lower()
|
||||
|
||||
|
||||
class ReverseZone(WhoisObject):
|
||||
class ReverseZone(DSRecordModelMixin, WhoisObject):
|
||||
handle = None
|
||||
|
||||
parentNet = models.ForeignKey(InetNum)
|
||||
|
|
Loading…
Reference in New Issue