def mentors_list(): mentor_name = request.args.get('mentor-last-name') if mentor_name: mentor_details = data_manager.get_mentors_by_last_name(mentor_name) else: mentor_details = data_manager.get_mentors() # We get back a list of dictionaries from the data_manager (for details check 'data_manager.py') return render_template('mentors.html', mentors=mentor_details)
def mentors_list(): mentor_name = request.args.get('mentor-last-name') city_name = request.args.get('city-name') if mentor_name: mentor_details = data_manager.get_mentors_by_last_name(mentor_name) elif city_name: mentor_details = data_manager.get_mentors_by_city(city_name) else: mentor_details = data_manager.get_mentors() # We get back a list of dictionaries from the data_manager (for details check 'data_manager.py') return render_template( 'mentors.html', mentors=mentor_details, city_name=city_name ) # city_name are rostul, aici, de a pastra ultima selectie pe buton
def mentors(): # We get back dictionaries here (for details check 'database_common.py') mentors = data_manager.get_mentors() return render_template('mentors.html', mentors=mentors)