Exemplo n.º 1
0
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)
Exemplo n.º 2
0
 def get(self):
     return {
         'courses': [course.json() for course in CourseModel.find_all()]
     }