Showing
1 changed file
with
3 additions
and
3 deletions
... | @@ -162,13 +162,13 @@ def verify(): | ... | @@ -162,13 +162,13 @@ def verify(): |
162 | attendance_db.close() | 162 | attendance_db.close() |
163 | return send | 163 | return send |
164 | 164 | ||
165 | -@app.route('/attendance.html') | 165 | +@app.route('/attendance') |
166 | def tempAttendance(): | 166 | def tempAttendance(): |
167 | attendance_db = pymysql.connect(read_default_file="./DB.cnf") | 167 | attendance_db = pymysql.connect(read_default_file="./DB.cnf") |
168 | cursor = attendance_db.cursor(pymysql.cursors.DictCursor) | 168 | cursor = attendance_db.cursor(pymysql.cursors.DictCursor) |
169 | 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;" | 169 | 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;" |
170 | - mycursor.execute(sql) | 170 | + cursor.execute(sql) |
171 | - data = mycursor.fetchall() | 171 | + data = cursor.fetchall() |
172 | return render_template('attendance.html', output_data = data) | 172 | return render_template('attendance.html', output_data = data) |
173 | 173 | ||
174 | @app.route('/robots.txt') | 174 | @app.route('/robots.txt') | ... | ... |
-
Please register or login to post a comment