示例#1
0
def speakers(year=DEFAULT_YEAR):
    """List of speakers for a conference"""
    conf = Conference(year=year).get()
    if conf:
        speakers = conf.fetch_speakers()
        return jsonify(dict(results=list(filter(lambda s: s['status'] == 'accepted', speakers))))
    return 'Conference speaker announcements coming soon.'
示例#2
0
def team(year=DEFAULT_YEAR):
    """List of team members for a conference"""
    conf = Conference(year=year).get()
    if conf:
        staff = conf.fetch_staff()
        return jsonify(dict(results=staff))
    return 'Conference staff announcement coming soon.'
示例#3
0
def conference_edit(conferenceId):
    conference = Conference(id=conferenceId).get()
    form = EditConferenceForm(request.form, conference)
    if request.method == 'POST':
        del conference.created_at
        del conference.updated_at
        conference.load(**request.form).put()
        return redirect(url_for('admin.conference_info', conferenceId=conferenceId))
    return render_template('form.html', **locals())