更新 views.py
parent
b7fac7ca42
commit
a55b7efd20
19
app/views.py
19
app/views.py
|
|
@ -127,8 +127,16 @@ def profile():
|
||||||
|
|
||||||
@app.route('/course-info', methods=['GET', 'POST'])
|
@app.route('/course-info', methods=['GET', 'POST'])
|
||||||
def course_info():
|
def course_info():
|
||||||
|
if request.method == "GET":
|
||||||
return render_template('course-info.html')
|
return render_template('course-info.html')
|
||||||
|
|
||||||
|
@app.route('/api/get-course-info', methods=['GET'])
|
||||||
|
def get_course_info():
|
||||||
|
db_manager = DatabaseManager()
|
||||||
|
course_data = db_manager.get_all_courses()
|
||||||
|
return jsonify(course_data)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/attendance', methods=['GET', 'POST'])
|
@app.route('/attendance', methods=['GET', 'POST'])
|
||||||
def course_checkin():
|
def course_checkin():
|
||||||
return render_template('attendance.html')
|
return render_template('attendance.html')
|
||||||
|
|
@ -137,9 +145,20 @@ def course_checkin():
|
||||||
def announcement():
|
def announcement():
|
||||||
return render_template('announcement.html')
|
return render_template('announcement.html')
|
||||||
|
|
||||||
|
@app.route('/attendance-teacher', methods=['GET', 'POST'])
|
||||||
|
def announcement_teacher():
|
||||||
|
return render_template('attendance-teacher.html')
|
||||||
@app.route('/attendance-reminder', methods=['GET', 'POST'])
|
@app.route('/attendance-reminder', methods=['GET', 'POST'])
|
||||||
def attendance_reminder():
|
def attendance_reminder():
|
||||||
return render_template('attendance-reminder.html')
|
return render_template('attendance-reminder.html')
|
||||||
|
|
||||||
|
@app.route('/course-category', methods=['GET', 'POST'])
|
||||||
|
def course_category():
|
||||||
|
return render_template('course-category.html')
|
||||||
|
|
||||||
|
@app.route('/attendance-teacher/import-class', methods=['GET'])
|
||||||
|
def import_class():
|
||||||
|
return render_template('import-class.html')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(debug=True)
|
app.run(debug=True)
|
||||||
|
|
|
||||||
Reference in New Issue