def clean(self, value): cleaned_path = CharField.clean(self, value) if value.lower().startswith(S3_ROOT): cleaned_path = s3_normpath(cleaned_path) else: cleaned_path = normpath(cleaned_path) return cleaned_path
def clean(self, value): cleaned_path = CharField.clean(self, value) if value.lower().startswith(S3A_ROOT): cleaned_path = s3_normpath(cleaned_path) else: cleaned_path = normpath(cleaned_path) return cleaned_path
def clean(self, value): cleaned_path = CharField.clean(self, value) if not value: value = '' elif value.lower().startswith(S3A_ROOT): cleaned_path = s3_normpath(cleaned_path) elif value.lower().startswith(ABFS_ROOT): cleaned_path = abfs_normpath(cleaned_path) else: cleaned_path = normpath(cleaned_path) return cleaned_path