Graduate

Update roll book

......@@ -162,13 +162,13 @@ def verify():
attendance_db.close()
return send
@app.route('/attendance.html')
@app.route('/attendance')
def tempAttendance():
attendance_db = pymysql.connect(read_default_file="./DB.cnf")
cursor = attendance_db.cursor(pymysql.cursors.DictCursor)
sql = "SELECT ls.student_id as student_id, s.student_name as student_name, ifnull(sa.status, 'absent') as status FROM lecture_students AS ls LEFT JOIN student_attendance AS sa ON ls.student_id = sa.student_id LEFT JOIN student AS s ON ls.student_id = s.student_id;"
mycursor.execute(sql)
data = mycursor.fetchall()
cursor.execute(sql)
data = cursor.fetchall()
return render_template('attendance.html', output_data = data)
@app.route('/robots.txt')
......