-
- def get_storage(self):
- return storage
-
- def save(self):
- document = Document(self.get_storage(), name=self.cleaned_data['name'], text=self.cleaned_data['text'])
- storage.put(document, self.cleaned_data['author'], self.cleaned_data['comment'],
- self.cleaned_data['revision'])
+
+ def save(self, document_author = 'anonymous'):
+ storage = getstorage()
+
+ document = Document(storage, name=self.cleaned_data['name'], text=self.cleaned_data['text'])
+
+ storage.put(document,
+ author = document_author,
+ comment = self.cleaned_data['comment'],
+ parent =self.cleaned_data['revision'] )
+
+ return storage.get(self.cleaned_data['name'])