Example #1
0
def students():
    post = request.json
    details = post['post']
    page = post['path']
    print("getting students", request.json, page)
    return render_template(page + ".html",
                           posts={'students': mongo3.get_filtered_students(details)})  # render a template
Example #2
0
def filter_student():
    print("getting students")
    details = {}
    data = {}
    # details['courses'] = courses()
    if request.method == 'POST':
        data = request.json
        print(data)
        details['students'] = mongo3.get_filtered_students(data)
        return render_template('students.html', posts=details)