Esempio n. 1
0
 def __init__(self,
              max_length=256,
              base_path=settings.MEDIA_ROOT,
              *args,
              **kwargs):
     super().__init__(*args, max_length=max_length, **kwargs)
     self.validators.append(
         validators.ExistingDirValidator(base_path=base_path))
Esempio n. 2
0
 def __init__(self, base_path=settings.MEDIA_ROOT, *args, **kwargs):
     super(DirectoryFormField, self).__init__(*args, **kwargs)
     self.validators.append(
         validators.ExistingDirValidator(base_path=base_path)
     )