1. George Notaras
  2. django-powerdns-manager


George Notaras  committed 9d32892

Added a BaseRecordModelForm.

  • Participants
  • Parent commits 99ee0b9
  • Branches default

Comments (0)

Files changed (1)

File src/powerdns_manager/forms.py

View file
  • Ignore whitespace
-class SoaRecordModelForm(forms.ModelForm):
+class BaseRecordModelForm(forms.ModelForm):
+    """Base ModelForm for Record instances.
+    """
+class SoaRecordModelForm(BaseRecordModelForm):
     """ModelForm for SOA resource records.
     By default, PowerDNS expects the content of the SOA records to contain the
 #        return 'soa-%s' % default_prefix
-class NsRecordModelForm(forms.ModelForm):
+class NsRecordModelForm(BaseRecordModelForm):
     """ModelForm for NS resource records."""
     class Meta:
         return super(NsRecordModelForm, self).save(*args, **kwargs)
-class MxRecordModelForm(forms.ModelForm):
+class MxRecordModelForm(BaseRecordModelForm):
     """ModelForm for MX resource records."""
     class Meta:
         return super(MxRecordModelForm, self).save(*args, **kwargs)
-class SrvRecordModelForm(forms.ModelForm):
+class SrvRecordModelForm(BaseRecordModelForm):
     """ModelForm for SRV resource records."""
     class Meta:
-class GenericRecordModelForm(forms.ModelForm):
+class GenericRecordModelForm(BaseRecordModelForm):
     """Generic ModelForm for resource records.
     This special ModelForm manipulates the available RR types by excluding