Exemple #1
0
    def validate_base_url(self, url_socket):

        valid, messages = validators.validate_url_chars(url_socket)
        if messages:
            raise TransferException(messages=messages)

        burl, messages_loc = validators.validate_url_format(url_socket)
        messages = messages + messages_loc
        if messages:
            raise TransferException(messages=messages)

        return burl, messages
Exemple #2
0
    def validate_base_url(self, url_socket):

        valid, messages = validators.validate_url_chars(url_socket)
        if messages:
            raise TransferException(messages=messages)

        burl, messages_loc = validators.validate_url_format(url_socket)
        messages = messages + messages_loc
        if messages:
            raise TransferException(messages=messages)

        return burl, messages
Exemple #3
0
 def save(self, *args, **kwargs):
     burl, messages = validators.validate_url_format(self.url)
     self.url = burl.url_socket
     super(self.__class__, self).save(*args, **kwargs)
Exemple #4
0
 def save(self, *args, **kwargs):
     burl, messages = validators.validate_url_format(self.url)
     self.url = burl.url_socket
     super(self.__class__, self).save(*args, **kwargs)