Changeset 12164 for main/waeup.ikoba/trunk
- Timestamp:
- 7 Dec 2014, 19:48:03 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/documents.py
r12162 r12164 67 67 grok.baseclass() 68 68 69 # Ikoba can store any number of files per Document object. 70 # However, we highly recommend to associate and store 71 # only one file per Document object. Thus the following 72 # tuple should contain only a single filename string. 69 73 filenames = () 70 74 … … 113 117 files = [] 114 118 try: 119 # Usually there is only a single element in self.filenames. 115 120 for filename in self.filenames: 116 121 attrname = filename.replace('.','_') … … 124 129 125 130 def setMD5(self): 126 """Set md5 checksum attribute for allfiles connected to this document.131 """Set md5 checksum attribute for files connected to this document. 127 132 """ 128 133 connected_files = self.connected_files … … 139 144 """ 140 145 146 # Ikoba can store any number of files per Document object. 147 # However, we highly recommend to associate and store 148 # only one file per Document object. Thus the following 149 # tuple should contain only a single filename string. 141 150 filenames = ('sample',) 142 151 … … 150 159 grok.provides(ICustomerPDFDocument) 151 160 161 # Ikoba can store any number of files per Document object. 162 # However, we highly recommend to associate and store 163 # only one file per Document object. Thus the following 164 # tuple should contain only a single filename string. 165 filenames = ('sample.pdf',) 166 152 167 CustomerPDFDocument = attrs_to_fields(CustomerPDFDocument) 153 168 154 169 155 # Customer documents must be importable. So we mightneed a factory.170 # Customer documents must be importable. So we need a factory. 156 171 class CustomerDocumentFactory(grok.GlobalUtility): 157 172 """A factory for customer documents.
Note: See TracChangeset for help on using the changeset viewer.