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
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)