コード例 #1
0
ファイル: uimodules.py プロジェクト: ColaMakerspace/makermon
 def add_member(handler):
     data = {
         k: handler.get_argument(k)
         for k in filter(lambda key: not key.startswith('_'),
                         handler.request.arguments)
     }
     members.add_member(data)
コード例 #2
0
def handle_new_member(message):
    try:
        if not mem.is_chat_registered(message):
            mem.add_chat(message)

        if mem.allow_add_member(message):
            mem.add_member(message)
            rw.save_stats_in_file(mem.file_of_members, mem.members)
            rw.delete_first__line_in_file(mem.file_of_members)
        mem.send_greetings(message)
    except Exception as e:
        bot.send_message(message.chat.id, e)
コード例 #3
0
ファイル: app.py プロジェクト: vigneshprasad/GroupFinder
def register():
    memberID = request.form.get('username')
    name = request.form.get('name')
    password = request.form.get('password')
    email = request.form.get('email')
    location = request.form.get('location')
    return jsonify(
        members.add_member(memberID, name, password, email, location))
コード例 #4
0
    def post(self):
        name = self.request.get('name')
        email = self.request.get('email')
        status = self.request.get('status')
        stuy_id = self.request.get('id')
        osis = self.request.get('osis')
        phone = self.request.get('phone')
        homeroom = self.request.get('homeroom')
        grade = self.request.get('grade')
        success = add_member(name, stuy_id, email, status, osis, phone,
                             homeroom, grade)
        #while not success:
        #    success = add_member(name, stuy_id, email,status,osis,phone,homeroom,grade)
        send_email(name, stuy_id, email, status, osis, phone, homeroom, grade)

        template_values = {'email': email}
        self.render_template('submit.html', template_values)
コード例 #5
0
ファイル: app.py プロジェクト: mdeeb95/GroupFinder
def login():
	memberID = request.form['username']
	password = request.form['password']
	return jsonify(
		members.check_member(memberID, password)
	)

@app.route('/register', methods=['POST'])
def register():
	memberID = request.form.get('username')
	name = request.form.get('name')
	password = request.form.get('password')
    email = request.form.get('email')
    location = request.form.get('location')
	return jsonify(
		members.add_member(memberID, name, password)
	)

@app.route('/ban_member', methods=['POST'])
def ban_member():
	memberID = request.form['username']
	return jsonify(
		members.ban_member(memberID)
	)

@app.route('/unban_member', methods=['POST'])
def unban_member():
	memberID = request.form['username']
	return jsonify(
		members.unban_member(memberID)
	)