def new_scorecard(): if request.method == "POST": name = request.form.get('course') return redirect(url_for('course_scorecard', name=name)) courses_list = [course for course in CourseModel.find_all()] return render_template('select_scorecard.jinja2', courses_list=courses_list)
def get(self): return { 'courses': [course.json() for course in CourseModel.find_all()] }