def write(): if request.method == 'GET': return render_template('write.html', user=g.user, \ groups=get_groups()) topic = request.form.get('topic') group = request.form.get('group') deadline = request.form.get('deadline') votetype = request.form.get('votetype') options = request.form.getlist('options') create_subject(topic, group, deadline, votetype, options, g.user.username) return redirect(url_for('index', q=group))