Example #1
0
 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
Example #2
0
 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
Example #3
0
 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