コード例 #1
0
    def clean(self, *args, **kwargs):
        super(CydnsRecord, self).clean(*args, **kwargs)

        self.check_TLD_condition()
        check_no_ns_soa_condition(self.domain)
        self.check_domain_ctnr()
        self.check_for_delegation()
        if self.rdtype != 'CNAME':
            self.check_for_cname()
コード例 #2
0
ファイル: models.py プロジェクト: church29/cyder
    def clean(self, *args, **kwargs):
        super(CydnsRecord, self).clean(*args, **kwargs)

        self.check_TLD_condition()
        check_no_ns_soa_condition(self.domain)
        self.check_domain_ctnr()
        self.check_for_delegation()
        if self.rdtype != 'CNAME':
            self.check_for_cname()
コード例 #3
0
ファイル: models.py プロジェクト: OSU-Net/cyder
 def clean_views(self, views):
     """cleaned_data is the data that is going to be called with for
     updating an existing or creating a new object. Classes should implement
     this function according to their specific needs.
     """
     for view in views:
         if hasattr(self, 'domain'):
             check_no_ns_soa_condition(self.domain, view=view)
         if hasattr(self, 'reverse_domain'):
             check_no_ns_soa_condition(self.reverse_domain, view=view)
コード例 #4
0
 def clean_views(self, views):
     """cleaned_data is the data that is going to be called with for
     updating an existing or creating a new object. Classes should implement
     this function according to their specific needs.
     """
     for view in views:
         if hasattr(self, 'domain'):
             check_no_ns_soa_condition(self.domain, view=view)
         if hasattr(self, 'reverse_domain'):
             check_no_ns_soa_condition(self.reverse_domain, view=view)
コード例 #5
0
ファイル: models.py プロジェクト: OSU-Net/cyder
    def clean(self, *args, **kwargs):
        super(CydnsRecord, self).clean(*args, **kwargs)

        self.check_TLD_condition()
        check_no_ns_soa_condition(self.domain)
        self.check_domain_ctnr()
        if not (hasattr(self, "is_glue") and self.is_glue is True and
                self.pk is None):
            self.check_for_delegation()
        if self.rdtype != 'CNAME':
            self.check_for_cname()
コード例 #6
0
ファイル: models.py プロジェクト: woakes070048/cyder
    def clean(self, *args, **kwargs):
        super(CydnsRecord, self).clean(*args, **kwargs)

        self.check_TLD_condition()
        check_no_ns_soa_condition(self.domain)
        self.check_domain_ctnr()
        if not (hasattr(self, "is_glue") and self.is_glue is True
                and self.pk is None):
            self.check_for_delegation()
        if self.rdtype != 'CNAME':
            self.check_for_cname()
コード例 #7
0
    def clean(self, *args, **kwargs):
        super(BasePTR, self).clean(*args, **kwargs)

        is_new = self.pk is None

        if is_new:
            self.set_reverse_domain()
        else:
            db_self = self.__class__.objects.get(pk=self.pk)
            if db_self.ip_str != self.ip_str:
                self.set_reverse_domain()

        check_no_ns_soa_condition(self.reverse_domain)
        self.reverse_validate_no_cname()
        self.check_ip_conflict()
コード例 #8
0
ファイル: models.py プロジェクト: kiwim0n/cyder
    def clean(self, *args, **kwargs):
        super(BasePTR, self).clean(*args, **kwargs)

        is_new = self.pk is None

        if is_new:
            self.set_reverse_domain()
        else:
            db_self = self.__class__.objects.get(pk=self.pk)
            if db_self.ip_str != self.ip_str:
                self.set_reverse_domain()

        check_no_ns_soa_condition(self.reverse_domain)
        self.reverse_validate_no_cname()
        self.check_ip_conflict()