def index_events(): events = Event.select() event_list = [] for event in events: event = model_to_dict(event) event_list.append(event) return jsonify(event_list)
def index(): events = Event.select() return render_template('events/index.html', events=events)