def delete_attendance(course_id): Reservation.query.filter_by(course_id=course_id).filter_by( account_id=current_user.id).delete() course = Course.query.filter_by(id=course_id).first() tbd = db.session.query(User).filter_by(id=current_user.id).first() course.users.remove(tbd) db.session().commit() return render_template("courses/user_courses.html", my_courses=Course.find_my_courses(current_user.id))
def my_courses(): return render_template("courses/user_courses.html", my_courses=Course.find_my_courses(current_user.id))