Beispiel #1
0
 def qr_data(self, student):
     student_data = {}
     student_data = {
         'name':
         ' '.join([student.name, student.middle_name, student.last_name]),
         'roll_number':
         student.roll_number or '',
         'blood_group':
         student.blood_group or '',
         'course':
         student.course_id.name,
         'birth_date':
         student.birth_date or '',
         'address':
         '%s %s %s %s %s %s' % (
             student.street or '',
             student.street2 or '',
             student.city or '',
             student.zip or '',
             student.phone or '',
             student.email or '',
         )
     }
     qr = utils.get_barcode_image(value=student_data, code='QR')
     return qr
 def qr_data(self,student):
     student_data = {}
     address = student.street and student.street[0] or False
     student_data = {
                     'name': student.name + ' ' + student.middle_name + ' ' + student.last_name,
                     'roll_number': student.roll_number or '',
                     'blood_group': student.blood_group or '',
                     'course': student.course_id.name,
                     'birth_date': student.birth_date or '',
                     'address': '%s %s %s %s %s %s'%(student.street or '',
                                                     student.street2 or '',
                                                     student.city or '',
                                                     student.zip or '',
                                                     student.phone or '',
                                                     student.email or '',
                                                     )    
                     }
     qr = utils.get_barcode_image(value=student_data, code='QR')
     return qr
Beispiel #3
0
 def render_image(self,barcode):
     barcode = utils.get_barcode_image(value=barcode, code='QR')
     return barcode