Changeset 16402


Ignore:
Timestamp:
1 Mar 2021, 16:39:26 (4 years ago)
Author:
Henrik Bettermann
Message:

Add handwritten signature tp pd admission slip.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/browser/pdf.py

    r16304 r16402  
    3939        os.path.dirname(__file__), 'static', 'benji_signature.png')
    4040
     41    signature_olaoke_img_path = os.path.join(
     42        os.path.dirname(__file__), 'static', 'olaoke_signature.png')
     43
    4144    def _substitute_markers(self, text):
    4245        """
     
    4548        PDF_SIGNATURES =  {
    4649            'signature_benji_img_path': self.signature_benji_img_path,
     50            'signature_olaoke_img_path': self.signature_olaoke_img_path,
    4751            }
    4852        return text.safe_substitute(PDF_SIGNATURES)
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py

    r16298 r16402  
    495495Yours faithfully,
    496496
     497<img src="${signature_olaoke_img_path}" valign="-20" height="38" width="86" />
     498
    497499Mr. Olaoke, Olasoji Oluwole
    498500Secretary, School of Postgraduate Studies & Research
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py

    r16296 r16402  
    216216        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    217217        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
    218         path = os.path.join(samples_dir(), 'admission_slip.pdf')
    219         open(path, 'wb').write(self.browser.contents)
    220         print "Sample PDF admission_slip.pdf written to %s" % path
     218        path = os.path.join(samples_dir(), 'ug_admission_slip.pdf')
     219        open(path, 'wb').write(self.browser.contents)
     220        print "Sample PDF UG admission_slip.pdf written to %s" % path
     221        self.certificate.study_mode = 'pg_ft'
     222        self.browser.open(self.student_path)
     223        self.browser.getLink("Base Data").click()
     224        self.browser.getLink("Download admission letter").click()
     225        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     226        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     227        path = os.path.join(samples_dir(), 'pg_admission_slip.pdf')
     228        open(path, 'wb').write(self.browser.contents)
     229        print "Sample PDF PG admission_slip.pdf written to %s" % path
Note: See TracChangeset for help on using the changeset viewer.