52 model = soc.models.document.Document |
52 model = soc.models.document.Document |
53 |
53 |
54 #: list of model fields which will *not* be gathered by the form |
54 #: list of model fields which will *not* be gathered by the form |
55 exclude = ['inheritance_line', 'author', 'created', 'modified'] |
55 exclude = ['inheritance_line', 'author', 'created', 'modified'] |
56 |
56 |
57 def clean_partial_path(self): |
57 def clean_scope_path(self): |
58 partial_path = self.cleaned_data.get('partial_path') |
58 scope_path = self.cleaned_data.get('scope_path') |
59 # TODO(tlarsen): combine path and link_id and check for uniqueness |
59 # TODO(tlarsen): combine path and link_id and check for uniqueness |
60 if not validate.isPartialPathFormatValid(partial_path): |
60 if not validate.isScopePathFormatValid(scope_path): |
61 raise forms.ValidationError("This partial path is in wrong format.") |
61 raise forms.ValidationError("This scope path is in wrong format.") |
62 return partial_path |
62 return scope_path |
63 |
63 |
64 def clean_link_id(self): |
64 def clean_link_id(self): |
65 link_id = self.cleaned_data.get('link_id') |
65 link_id = self.cleaned_data.get('link_id') |
66 # TODO(tlarsen): combine path and link_id and check for uniqueness |
66 # TODO(tlarsen): combine path and link_id and check for uniqueness |
67 if not validate.isLinkIdFormatValid(link_id): |
67 if not validate.isLinkIdFormatValid(link_id): |