Skip to content

Instantly share code, notes, and snippets.

@Sytten
Last active May 19, 2020 00:49
Show Gist options
  • Save Sytten/ecb6bb89c6f4c7a359095d07797dbe39 to your computer and use it in GitHub Desktop.
Save Sytten/ecb6bb89c6f4c7a359095d07797dbe39 to your computer and use it in GitHub Desktop.
failing-revenge-route
@bp.route("/<school_name>/course/<course_id>")
@valid_school
def grades(school_name, course_id):
grades = _api(f'/course/{course_id}')
if grades == {}:
return render_template("error.html", message="Course not found")
return render_template("grades.html", school_name=school_name,
grades=grades['grades'],
course_name=grades['course_name'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment