Changeset 7086
- Timestamp:
- 11 Nov 2011, 16:37:03 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7085 r7086 68 68 IApplicant, IApplicantPrincipal,IApplicantEdit, IApplicantsRoot, 69 69 IApplicantsContainer, IApplicantsContainerAdd, application_types_vocab, 70 IMAGE_PATH, MAX_UPLOAD_SIZE,70 DEFAULT_PASSPORT_IMAGE_MALE, MAX_UPLOAD_SIZE, 71 71 ) 72 72 from waeup.sirp.applicants.workflow import INITIALIZED, STARTED … … 655 655 img = getUtility(IExtFileStore).getFileByContext(self.context) 656 656 if img is None: 657 img = open(os.path.join(IMAGE_PATH, 'placeholder_m.jpg'), 'rb')657 img = DEFAULT_PASSPORT_IMAGE_MALE 658 658 doc_img = Image(img.name, width=4*cm, height=3*cm, kind='bound') 659 659 story.append(doc_img) … … 868 868 if image is None: 869 869 # show placeholder image 870 return open(os.path.join(IMAGE_PATH, 'placeholder_m.jpg'), 'rb')870 return DEFAULT_PASSPORT_IMAGE_MALE 871 871 return image -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r7075 r7086 49 49 ) 50 50 DEFAULT_PASSPORT_IMAGE_MALE = open( 51 os.path.join(IMAGE_PATH, 'placeholder_m.jpg')).read() 52 DEFAULT_PASSPORT_IMAGE_FEMALE = open( 53 os.path.join(IMAGE_PATH, 'placeholder_f.jpg')).read() 51 os.path.join(IMAGE_PATH, 'placeholder_m.jpg')) 54 52 55 53 #: Maximum upload size for applicant passport photographs (in bytes) 56 MAX_UPLOAD_SIZE = 1024 * 1054 MAX_UPLOAD_SIZE = 1024 * 20 57 55 58 56 # Define a valiation method for email addresses -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py
r7083 r7086 666 666 self.login() 667 667 # Create a pseudo image file and select it to be uploaded in form 668 photo_content = 'A' * 1024 * 11 # A string of 11 GB size668 photo_content = 'A' * 1024 * 21 # A string of 11 GB size 669 669 pseudo_image = StringIO(photo_content) 670 670 ctrl = self.browser.getControl(name='form.passport')
Note: See TracChangeset for help on using the changeset viewer.