Ignore:
Timestamp:
28 Oct 2014, 10:53:10 (10 years ago)
Author:
uli
Message:

While at it: pep8.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kwarapoly/branches/uli-pdfsigs/src/waeup/kwarapoly/students/browser.py

    r11878 r11880  
    5656    )
    5757
     58
    5859class CustomStudentBaseEditFormPage(NigeriaStudentBaseEditFormPage):
    5960    """ View to edit student base data
     
    6263        'email', 'phone', 'sex')
    6364
    64 class CustomStudentPersonalDisplayFormPage(NigeriaStudentPersonalDisplayFormPage):
     65
     66class CustomStudentPersonalDisplayFormPage(
     67    NigeriaStudentPersonalDisplayFormPage):
    6568    """ Page to display student personal data
    6669    """
     
    7376        'personal_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    7477
     78
    7579class CustomStudentPersonalEditFormPage(NigeriaStudentPersonalEditFormPage):
    7680    """ Page to edit personal data
     
    7983        'personal_updated')
    8084
    81 class CustomStudentPersonalManageFormPage(NigeriaStudentPersonalManageFormPage):
     85
     86class CustomStudentPersonalManageFormPage(
     87    NigeriaStudentPersonalManageFormPage):
    8288    """ Page to edit personal data
    8389    """
     
    8692    form_fields[
    8793        'personal_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     94
    8895
    8996class CustomOnlinePaymentDisplayFormPage(NigeriaOnlinePaymentDisplayFormPage):
     
    98105        'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    99106
     107
    100108class CustomOnlinePaymentAddFormPage(NigeriaOnlinePaymentAddFormPage):
    101109    """ Page to add an online payment ticket
     
    103111    form_fields = grok.AutoFields(ICustomStudentOnlinePayment).select(
    104112        'p_category')
     113
    105114
    106115class CustomExportPDFPaymentSlipPage(NigeriaExportPDFPaymentSlipPage):
     
    110119    form_fields = grok.AutoFields(ICustomStudentOnlinePayment).omit(
    111120        'provider_amt', 'gateway_amt', 'thirdparty_amt', 'p_item')
    112     form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    113     form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     121    form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget(
     122        'le')
     123    form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget(
     124        'le')
     125
    114126
    115127class CustomStartClearancePage(StartClearancePage):
     
    118130
    119131
    120 class CustomStudentClearanceDisplayFormPage(NigeriaStudentClearanceDisplayFormPage):
     132class CustomStudentClearanceDisplayFormPage(
     133    NigeriaStudentClearanceDisplayFormPage):
    121134    """ Page to display student clearance data
    122135    """
     
    135148            form_fields['officer_comment'].custom_widget = BytesDisplayWidget
    136149        return form_fields
     150
    137151
    138152class CustomExportPDFClearanceSlipPage(NigeriaExportPDFClearanceSlipPage):
     
    152166        return form_fields
    153167
    154 class CustomStudentClearanceManageFormPage(NigeriaStudentClearanceManageFormPage):
     168
     169class CustomStudentClearanceManageFormPage(
     170    NigeriaStudentClearanceManageFormPage):
    155171    """ Page to edit student clearance data
    156172    """
     
    165181                ICustomUGStudentClearance).omit('clr_code')
    166182        return form_fields
     183
    167184
    168185class CustomStudentClearanceEditFormPage(NigeriaStudentClearanceEditFormPage):
     
    183200        return form_fields
    184201
     202
    185203class BedTicketAddPage(BedTicketAddPage):
    186204    """ Page to add an online payment ticket
     
    190208    with_ac = False
    191209
     210
    192211class CustomExportPDFAdmissionSlipPage(ExportPDFAdmissionSlipPage):
    193212    """Deliver a PDF Admission slip.
     
    197216    omit_fields = ('date_of_birth', 'current_level')
    198217
    199     form_fields = grok.AutoFields(ICustomStudent).select('student_id', 'reg_number')
     218    form_fields = grok.AutoFields(ICustomStudent).select(
     219        'student_id', 'reg_number')
    200220
    201221    def render(self):
     
    208228        return students_utils.renderPDFAdmissionLetter(self,
    209229            self.context.student, omit_fields=self.omit_fields)
     230
    210231
    211232class ExportPDFAdmissionNotificationPage(UtilityView, grok.View):
     
    235256            pre_text=pre_text, post_text=post_text)
    236257
     258
    237259# copied from waeup.aaue
    238260class CustomExportPDFCourseRegistrationSlipPage(
     
    262284             'I recommend to approve the course registration. <br>',
    263285             _('Head of Department\'s Signature'), '<br>')],
    264             [('' , _('Principal Assistant Registrar\'s Signature'), '<br>')],
     286            [('', _('Principal Assistant Registrar\'s Signature'), '<br>')],
    265287            [('', _('Director\'s Signature'))]
    266288            )
     
    270292        Sem = translate('Sem.', 'waeup.kofa', target_language=portal_language)
    271293        Code = translate('Code', 'waeup.kofa', target_language=portal_language)
    272         Title = translate('Title', 'waeup.kofa', target_language=portal_language)
    273         Cred = translate('Cred.', 'waeup.kofa', target_language=portal_language)
    274         Score = translate('Score', 'waeup.kofa', target_language=portal_language)
    275         Grade = translate('Grade', 'waeup.kofa', target_language=portal_language)
     294        Title = translate('Title', 'waeup.kofa',
     295                          target_language=portal_language)
     296        Cred = translate(
     297            'Cred.', 'waeup.kofa', target_language=portal_language)
     298        Score = translate('Score', 'waeup.kofa',
     299                          target_language=portal_language)
     300        Grade = translate('Grade', 'waeup.kofa',
     301                          target_language=portal_language)
    276302        Signature = translate(_('HOD\'s Signature'), 'waeup.kwarapoly',
    277303            target_language=portal_language)
     
    283309        tableheader = []
    284310        contenttitle = []
    285         for i in range(1,7):
     311        for i in range(1, 7):
    286312            tabledata.append(sorted(
    287                 [value for value in self.context.values() if value.semester == i],
     313                [value for value in self.context.values()
     314                 if value.semester == i],
    288315                key=lambda value: str(value.semester) + value.code))
    289             tableheader.append([(Code,'code', 2.0),
    290                                (Title,'title', 7),
     316            tableheader.append([(Code, 'code', 2.0),
     317                               (Title, 'title', 7),
    291318                               (Cred, 'credits', 1.5),
    292319                               (Score, 'score', 1.4),
     
    310337            )
    311338
     339
    312340class ExportPDFRegistrationSlipPage(grok.View):
    313341    """Deliver a PDF slip of the context.
     
    343371<strong>IMPORTANT NOTICE</strong>
    344372<br /><br />
    345 This registration slip must be supplied before attendance of lectures. Note that:<br /><br />
    346 1. All fees due must be paid in full.<br /><br />
    347 2. All information required must be available on the Registration Form.<br /><br />
    348 3. The Signature of all appropriate Polytechnic Authority must be obtained.<br /><br />
    349 4. The endorsed Registration Form should be returned to the respective Institutes and Administrative Offices.<br /><br />
    350 5. No student may change his subject or course of study as shown in the signed Registration Form without clearance from the Admissions Office and the Director of the appropriate Institute.<br /><br />
    351 6. All candidates admitted into the HND I programmes should submit the photocopies of their original certificates of ND and SSCE with scratch card online for clearance latest a week after the admission is offered. Failure to comply with this directive may lead to the forfeiture of the admission.<br /><br />
     373This registration slip must be supplied before attendance of lectures.
     374Note that:
     375<br /><br />
     3761. All fees due must be paid in full.
     377<br /><br />
     3782. All information required must be available on the Registration Form.
     379<br /><br />
     3803. The Signature of all appropriate Polytechnic Authority must be obtained.
     381<br /><br />
     3824. The endorsed Registration Form should be returned to the respective
     383   Institutes and Administrative Offices.
     384<br /><br />
     3855. No student may change his subject or course of study as shown in the
     386   signed Registration Form without clearance from the Admissions Office
     387   and the Director of the appropriate Institute.
     388<br /><br />
     3896. All candidates admitted into the HND I programmes should submit the
     390   photocopies of their original certificates of ND and SSCE with scratch
     391   card online for clearance latest a week after the admission is offered.
     392   Failure to comply with this directive may lead to the forfeiture of
     393   the admission.
     394<br /><br />
    352395
    353396M.O. Adebayo<br />
     
    359402<strong>INSTRUCTIONS TO FRESHERS</strong>
    360403<br /><br />
    361 You are hereby offered a provisional admission for the 2014/2015 session subject to the conditions that:
    362 <br /><br />
    363 1. The information given in your Application Form is correct.<br /><br />
    364 2. The original of your Credentials are presented for scrutiny.<br /><br />
    365 3. If at any time the Credentials submitted are found to be false/fake or incorrect, your admission shall be withdrawn.<br /><br />
    366 4. The name by which you are admitted and registered shall remain same throughout the duration of your programme.<br /><br />
    367 5. You are to fill and submit the Undertaking Form at the point of registration failure which your admission will be forfeited.<br /><br />
    368 6. You will dress decently covering your nakedness at all times.<br /><br />
    369 7. Payment of school fees will be once and in full and should be by Interswitch to the designated Banks. Failure to pay fees by the mode mentioned above by the closing date means you have declined the offer and your place will be given to another eligible candidate immediately.<br /><br />
    370 8. You present a Certificate of medical fitness from the Polytechnic Clinic.<br /><br />
    371 9. All indigenes of Kwara State are required to present Certificate of Citizenship.<br /><br />
    372 10. The Polytechnic reserves the right to withdraw your admission at any stage, if you are found to be a cultist or an expelled individual from any tertiary institution.<br /><br />
    373 11. You are prepared to take up accommodation provided on the campuses by the authority.<br /><br />
    374 12. There will be no refund of school fees once paid.<br /><br />
    375 13. If you accept this offer with the above stated conditions, please make a photocopy of this document and return it to the Admission Office immediately.<br /><br />
    376 14. You possess the entry requirement for the programme you are admitted.<br /><br />
    377 
    378 <img src="${signature_img_path}" valign="middle"  height="45.8mm" width="20mm" /><br />
     404You are hereby offered a provisional admission for the 2014/2015 session
     405subject to the conditions that:
     406<br /><br />
     4071. The information given in your Application Form is correct.
     408<br /><br />
     4092. The original of your Credentials are presented for scrutiny.
     410<br /><br />
     4113. If at any time the Credentials submitted are found to be false/fake
     412   or incorrect, your admission shall be withdrawn.
     413<br /><br />
     4144. The name by which you are admitted and registered shall remain same
     415   throughout the duration of your programme.
     416<br /><br />
     4175. You are to fill and submit the Undertaking Form at the point of
     418   registration failure which your admission will be forfeited.
     419<br /><br />
     4206. You will dress decently covering your nakedness at all times.
     421<br /><br />
     4227. Payment of school fees will be once and in full and should be by
     423   Interswitch to the designated Banks. Failure to pay fees by the
     424   mode mentioned above by the closing date means you have declined
     425   the offer and your place will be given to another eligible
     426   candidate immediately.
     427<br /><br />
     4288. You present a Certificate of medical fitness from the Polytechnic
     429   Clinic.
     430<br /><br />
     4319. All indigenes of Kwara State are required to present Certificate of
     432   Citizenship.
     433<br /><br />
     43410. The Polytechnic reserves the right to withdraw your admission at
     435    any stage, if you are found to be a cultist or an expelled
     436    individual from any tertiary institution.
     437<br /><br />
     43811. You are prepared to take up accommodation provided on the campuses
     439    by the authority.
     440<br /><br />
     44112. There will be no refund of school fees once paid.
     442<br /><br />
     44313. If you accept this offer with the above stated conditions, please
     444    make a photocopy of this document and return it to the Admission
     445    Office immediately.
     446<br /><br />
     44714. You possess the entry requirement for the programme you are admitted.
     448<br /><br />
     449
     450<img src="${signature_img_path}" valign="middle"
     451     height="45.8mm" width="20mm" />
     452<br />
    379453M.O. Adebayo<br />
    380454Admission Officer<br />
Note: See TracChangeset for help on using the changeset viewer.