Changeset 12436 for main


Ignore:
Timestamp:
10 Jan 2015, 06:42:35 (10 years ago)
Author:
Henrik Bettermann
Message:

Store public documents in right place.

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  
    252252
    253253        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'``
    258257
    259258        meaning that the nice image of this document would be
    260259        stored in the site-wide file storage in path:
    261260
    262           ``documents/nice_image_d123.jpeg``
     261          ``nice_image_d123.jpeg``
    263262
    264263        """
    265264        basename, ext = os.path.splitext(attr)
    266265        doc_id = self.context.document_id
    267         marked_filename = '__%s__documents/%s_%s%s' % (
     266        marked_filename = '__%s__%s_%s%s' % (
    268267            DOCUMENT_FILE_STORE_NAME,
    269268            basename, doc_id, ext)
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests/test_document.py

    r12408 r12436  
    165165        # the file would be stored in a ``_default`` directory.
    166166        self.assertEqual(
    167             result, '__file-document__documents/sample_DOC.jpg')
     167            result, '__file-document__sample_DOC.jpg')
    168168        return
Note: See TracChangeset for help on using the changeset viewer.