- Timestamp:
- 11 Jan 2015, 16:53:38 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/document.py
r12436 r12442 40 40 IPDFDocument, IHTMLDocument, IRESTDocument) 41 41 42 43 @grok.subscribe(IDocument, grok.IObjectRemovedEvent) 44 def handle_document_removed(document, event): 45 store = getUtility(IExtFileStore) 46 for filename in document.filenames: 47 store.deleteFileByContext(document, attr=filename) 48 return 49 42 50 class Document(grok.Container): 43 51 """This is a document. … … 48 56 49 57 form_fields_interface = None 58 59 # Kofa can store any number of files per Document object. 60 # However, we highly recommend to associate and store 61 # only one file per Document object. Thus the following 62 # tuple should contain only a single filename string. 63 filenames = () 50 64 51 65 local_roles = [ … … 132 146 form_fields_interface = IPDFDocument 133 147 148 filenames = ('scan.pdf',) 149 134 150 PDFDocument = attrs_to_fields(PDFDocument) 135 151
Note: See TracChangeset for help on using the changeset viewer.