Changeset 1416 for WAeUP_SRP/trunk


Ignore:
Timestamp:
14 Feb 2007, 16:29:01 (18 years ago)
Author:
joachim
Message:

check if matric_no already exist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/add_student.py

    r1415 r1416  
    4747elif psm == 'valid':
    4848    pass
    49 ##firstname = ds.get('firstname')
    50 ##middlename = ds.get('middlename')
    51 ##lastname = ds.get('lastname')
    52 ##email = ds.get('email')
    53 ##matric_no = ds.get('matric_no')
    54 ##study_course = ds.get('study_course')
    55 ##level = ds.get('level')
     49matric_no = ds.get('matric_no')
     50res = context.students_catalog(matric_no = matric_no)
     51psm = "Student with matric_no %s exists with Id: %s" % (matric_no,res[0].id)
     52if res:
     53    return context.add_student_form(rendered = rendered,
     54                                 psm = psm,
     55                                 #psm = "%s, %s" % (psm,ds),
     56                                 mode = mode,
     57                                 formaction = "add_student",
     58                                 button = "add",
     59                                 ds = ds,
     60                                 )
    5661dict = {}
    5762dict.update(ds)
Note: See TracChangeset for help on using the changeset viewer.