Esempio n. 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"]
Esempio n. 2
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"]
Esempio n. 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"]
Esempio n. 4
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"]