- Timestamp:
- 12 Jun 2011, 20:06:56 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r6359 r6360 540 540 form_fields = grok.AutoFields(IApplicant).omit( 541 541 'locked').omit('course_admitted') 542 form_fields['passport'].custom_widget = ThumbnailWidget542 #form_fields['passport'].custom_widget = ThumbnailWidget 543 543 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le') 544 544 … … 570 570 from reportlab.lib.pagesizes import A4, landscape 571 571 from reportlab.lib.styles import getSampleStyleSheet 572 from reportlab.platypus import Frame, Paragraph 572 from reportlab.platypus import Frame, Paragraph, Image 573 573 574 574 pdf = canvas.Canvas('application_slip.pdf',pagesize=A4) … … 578 578 frame = Frame(1*cm,1*cm,width-(2*cm),height-(2*cm)) 579 579 self.setUpWidgets() 580 #import pdb; pdb.set_trace()580 581 581 for widget in self.widgets: 582 582 if widget.name != 'form.passport': 583 583 ptext = widget() 584 584 story.append(Paragraph(ptext, style["Normal"])) 585 else: 586 #import pdb; pdb.set_trace() 587 filename = widget._data.file.name 588 im = Image(filename) 589 story.append(im) 585 590 frame.addFromList(story,pdf) 586 591 self.response.setHeader(
Note: See TracChangeset for help on using the changeset viewer.