예제 #1
0
def nomination_edit(nominationId, status):
    nomination = Nomination(id=nominationId).get()
    speaker = Speaker(id=nomination.speaker).get()
    if speaker:
        del speaker.created_at
        del speaker.updated_at
        speaker.load(status=status).put()
    return redirect(url_for('admin.nominations'))
예제 #2
0
def speaker_edit(speakerId):
    conf = get_conference()
    speaker = Speaker(id=speakerId).get()
    form = EditSpeakerForm(request.form, speaker)
    if request.method == 'POST':
        del speaker.created_at
        del speaker.updated_at
        speaker.load(**request.form).put()
        return redirect(url_for('admin.speaker_info', speakerId=speakerId))
    return render_template('form.html', **locals())