Changeset 2675 for WAeUP_SRP/base/Widgets.py
- Timestamp:
- 16 Nov 2007, 09:45:30 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/Widgets.py
r2663 r2675 21 21 from Products.WAeUP_SRP.Students import getStudentByRegNo 22 22 from Products.WAeUP_SRP.Academics import makeCertificateCode 23 from Products.WAeUP_SRP.WAeUPTool import getImagesDir 23 24 #from Products.ExtFile.ExtFile import ExtFile 24 25 import logging,os,re … … 1804 1805 ) 1805 1806 path = "images" 1806 storage_path = "%s/%s" % (i_home,path)1807 #storage_path = "%s/%s" % (i_home,path) 1807 1808 id_field = "" 1808 1809 show_image = False … … 1814 1815 else: 1815 1816 student_id = datastructure[self.id_field] 1816 student_path = os.path.join(self.storage_path, 1817 student_id) 1817 # student_path = os.path.join(self.storage_path, 1818 # student_id) 1819 student_path = getImagesDir(student_id) 1818 1820 image_name = '' 1819 1821 content_url = '' … … 1827 1829 info['image_name'] = image_name 1828 1830 info['content_url'] = os.path.join(self.portal_url(), 1829 "viewimage", 1830 self.path, 1831 student_id, 1832 image_name, 1833 ) 1834 info['current_filename'] = os.path.join(student_id, 1835 image_name) 1836 info['file_path'] = os.path.join(self.storage_path, 1837 info['current_filename']) 1831 "viewimage", 1832 student_id, 1833 image_name, 1834 ) 1835 info['current_filename'] = image_name 1836 info['file_path'] = os.path.join(student_path, image_name) 1838 1837 return info 1839 1838 … … 1945 1944 student_id = datastructure[self.id_field] 1946 1945 if student_id is not None: 1947 student_path = os.path.join(self.storage_path,student_id) 1946 # student_path = os.path.join(self.storage_path, 1947 # student_id) 1948 student_path = getImagesDir(student_id) 1948 1949 if not os.path.exists(student_path): 1949 1950 self.waeup_tool.moveImagesToFS(student_id) … … 2038 2039 file.content_type = mimetype 2039 2040 # Store the file in the filesystem 2040 student_path = os.path.join(self.storage_path,student_id) 2041 #student_path = os.path.join(self.storage_path,student_id) 2042 student_path = getImagesDir(student_id) 2041 2043 if not os.path.exists(student_path): 2042 2044 os.mkdir(student_path)
Note: See TracChangeset for help on using the changeset viewer.