Exemplo n.º 1
0
    def clean_name(self):

        name = self.cleaned_data['name']
        project = self.cleaned_data['project']

        # make sure name is unique with the project
        try:
            n = Folder.objects.filter(project=project).get(name__iexact=name)
            raise forms.ValidationError("The folder name: %s already exists, please try again. "
                                        % n.name)
        except Folder.DoesNotExist:
            pass

        # looks for invalid characters
        name = default_clean_field(self, 'name')

        return name
Exemplo n.º 2
0
 def clean_description(self):
     return default_clean_field(self, 'description')
Exemplo n.º 3
0
 def clean_name(self):
     return default_clean_field(self, 'name')
Exemplo n.º 4
0
 def clean_name(self):
     return default_clean_field(self, 'name')
Exemplo n.º 5
0
 def clean_label(self):
     return default_clean_field(self, 'label')
Exemplo n.º 6
0
 def clean_key(self):
     return default_clean_field(self, 'key')