Changeset 7102 for main/waeup.sirp/trunk/src/waeup/sirp/students/student.py
- Timestamp:
- 13 Nov 2011, 09:18:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/student.py
r7099 r7102 182 182 *Example:* 183 183 184 For a student with student id ``'A123456'`` and 185 with attr ``'nice_image'`` stored in 184 For a student with student id ``'A123456'``, 185 with attr ``'nice_image'`` and an uploaded file named 186 `'anybasename.JPG'`` to be stored in 186 187 the students container this chooser would create: 187 188 … … 194 195 195 196 """ 197 ext = u'' 198 if name and name.count('.') == 1: 199 basename, ext = os.path.splitext(name) 200 ext.lower() 196 201 stud_id = self.context.student_id 197 marked_filename = '__%s__%s/%s/%s_%s .jpg' % (198 STUDENT_FILE_STORE_NAME, stud_id[0], stud_id, attr, stud_id )202 marked_filename = '__%s__%s/%s/%s_%s%s' % ( 203 STUDENT_FILE_STORE_NAME, stud_id[0], stud_id, attr, stud_id, ext) 199 204 return marked_filename 200 205
Note: See TracChangeset for help on using the changeset viewer.