def remove_guest(guest_id): gu = entries.find_guest_by_id(guest_id) if not gu: logi('not found guest id: %d', guest_id) return abort(404) if not entries.has_permission_to_delete_guest(guest_id): logi('no permission to delete guest: %d', guest_id) return abort(403) logi('delete guest: %d', guest_id) entries.delete_guest_by_id(guest_id) info_message(message=u'%s の参加表明を取り消しました。' % gu['name'], title=u'更新ありがとうございます!') return redirect(url_for('schedule.schedule'))
def add_rule(): body = sanitize_html(request.form['body']) rules.insert(body) info_message(message=u'規約を追加しましたね。通知とかしたほうがいいんじゃないすか?', title=u'規約を追加しました') return redirect(url_for('general.rule'))
def delete_rule(id): rules.delete(id) info_message(message=u'規約を削除しましたね。通知とかしたほうがいいんじゃないすか?', title=u'規約を削除しました') return redirect(url_for('general.rule'))
def handle_joinreq(id): joins.handle_join_request(id) info_message(message=u'応募者対応、ありがとう!', title=u'応募者に対応しました') return redirect(url_for('general.show_join_reqs'))
def delete_report(r): r.delete() info_message(message=u'活動記録を削除しました。') return redirect(url_for('general.report_list'))
name = request.form['name'] home = request.form['home'] email = request.form['email'] sex = request.form['sex'] age = request.form['age'] car = request.form['car'] has_racket = request.form['has_racket'] holiday = request.form['holiday'] experience = request.form['experience'] comment = request.form['comment'] logi('join request: name=%s', name) joins.insert(name, home, email, sex, age, car, has_racket, holiday, experience, comment) info_message(message=u'後日、サークルのものから折り返し連絡します。', title=u'応募ありがとうございます!') return redirect(url_for('general.index')) @mod.route('/new_join_requests') @requires_login def show_join_reqs(): joinreqs = joins.find_not_handled() return render_template('joinreqs_new.html', joinreqs=joinreqs) @mod.route('/handle_joinreq/<int:id>') @requires_permission(users.PERM_ADMIN_MEMBER) def handle_joinreq(id): joins.handle_join_request(id) info_message(message=u'応募者対応、ありがとう!', title=u'応募者に対応しました')