コード例 #1
0
    def add_reply_action(self, environ, start_response):
        print environ['wsgi.input']
        form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ)
        print form
        reply = form['reply'].value
        mId = form['message_id'].value

        meeplib.add_reply(int(mId), reply)
        meeplib.saveREPLY()
        headers = [('Content-type', 'text/html')]
        headers.append(('Location', '/m/list'))
        start_response("302 Found", headers)
        return ["reply added"]
コード例 #2
0
ファイル: meep_example_app.py プロジェクト: pfritschen/meep
 def add_reply_action(self, environ, start_response):
     print environ['wsgi.input']
     form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ)
     print form
     reply = form['reply'].value
     mId = form['message_id'].value
     
     meeplib.add_reply(int(mId), reply)
     meeplib.saveREPLY()
     headers = [('Content-type', 'text/html')]
     headers.append(('Location', '/m/list'))
     start_response("302 Found", headers)
     return ["reply added"]
コード例 #3
0
    def delete_message_action(self, environ, start_response):
        print environ['wsgi.input']
        form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ)

        id = int(form['id'].value)
        print id, ' A'
        meeplib.delete_message(meeplib.get_message(id))
        meeplib.delete_reply(id)
        meeplib.saveMSG()
        meeplib.saveREPLY()
        headers = [('Content-type', 'text/html')]
        headers.append(('Location', '/'))
        start_response("302 Found", headers)
        return ["message deleted"]
コード例 #4
0
ファイル: meep_example_app.py プロジェクト: pfritschen/meep
    def delete_message_action(self, environ, start_response):
        print environ['wsgi.input']
        form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ)

        id = int(form['id'].value)
        print id, ' A';
        meeplib.delete_message(meeplib.get_message(id))
        meeplib.delete_reply(id)
        meeplib.saveMSG()
        meeplib.saveREPLY()
        headers = [('Content-type', 'text/html')]
        headers.append(('Location', '/'))
        start_response("302 Found", headers)
        return ["message deleted"]