def addData2(name,member, date1, role): if role: obj = Data2(name=role,member=member,date1=date1,role='Attendance') temp = obj.date1+ ' '+obj.member+' '+obj.name+' '+obj.role if obj.name == '---': pass else: self.stdout.write(temp) obj.save()
def addData2(name, member, date1, role): obj = Data2(name=name, member=member, date1=date1, role=role) obj.save()