- Timestamp:
- 10 Jan 2015, 06:42:35 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/document.py
r12434 r12436 252 252 253 253 For document with id 'd123' 254 with attr ``'nice_image.jpeg'`` stored in 255 the documents container this chooser would create: 256 257 ``'__file-document__documents/nice_image_d123.jpeg'`` 254 with attr ``'nice_image.jpeg'`` this chooser would create: 255 256 ``'__file-document__nice_image_d123.jpeg'`` 258 257 259 258 meaning that the nice image of this document would be 260 259 stored in the site-wide file storage in path: 261 260 262 `` documents/nice_image_d123.jpeg``261 ``nice_image_d123.jpeg`` 263 262 264 263 """ 265 264 basename, ext = os.path.splitext(attr) 266 265 doc_id = self.context.document_id 267 marked_filename = '__%s__ documents/%s_%s%s' % (266 marked_filename = '__%s__%s_%s%s' % ( 268 267 DOCUMENT_FILE_STORE_NAME, 269 268 basename, doc_id, ext) -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests/test_document.py
r12408 r12436 165 165 # the file would be stored in a ``_default`` directory. 166 166 self.assertEqual( 167 result, '__file-document__ documents/sample_DOC.jpg')167 result, '__file-document__sample_DOC.jpg') 168 168 return
Note: See TracChangeset for help on using the changeset viewer.