예제 #1
0
파일: app.py 프로젝트: lowks/untwisted
    def send_base(self, con, header, fd, data, version):
        response = Response()
        response.set_response('HTTP/1.1 200 OK')

        HTML = render('view.jinja', posts = DB.iterkeys())
        response.add_data(HTML)

        send_response(con, response)
예제 #2
0
파일: app.py 프로젝트: lowks/untwisted
    def send_base(self, con, header, fd, data, version):
        # The http response.
        response = Response()
        response.set_response('HTTP/1.1 200 OK')

        HTML = """ <html> 
                   <body>
                   <p> It is simple :P </p>
                   </body> </html>
               """

        response.add_data(HTML)

        # This function should be called just once.
        send_response(con, response)
예제 #3
0
파일: app.py 프로젝트: lowks/untwisted
    def load_index(self, con, header, fd, data, version):
        index = data['index'][0]

        response = Response()
        response.set_response('HTTP/1.1 200 OK')
        response.add_header(('Content-Type', 'image/jpeg'))

        response.add_data(DB[index])
        send_response(con, response)
예제 #4
0
파일: app.py 프로젝트: lowks/untwisted
    def load_index(self, con, header, fd, data, version):
        index = data['index'][0]

        response = Response()
        response.set_response('HTTP/1.1 200 OK')
        response.add_header(('Content-Type', 'image/jpeg'))

        response.add_data(DB[index])
        send_response(con, response)
예제 #5
0
파일: app.py 프로젝트: lowks/untwisted
    def send_base(self, con, header, fd, data, version):
        response = Response()
        response.set_response('HTTP/1.1 200 OK')

        HTML = render('view.jinja', posts=DB.iterkeys())
        response.add_data(HTML)

        send_response(con, response)
예제 #6
0
파일: app.py 프로젝트: lowks/untwisted
    def load_index(self, con, header, fd, data, version):
        index = data['index'][0]
        name, quote = DB[index]
        HTML = render('view.jinja', name=name, quote=quote)
        response = Response()

        response.set_response('HTTP/1.1 200 OK')
        response.add_data(HTML)

        send_response(con, str(response))
예제 #7
0
파일: app.py 프로젝트: lowks/untwisted
    def send_base(self, con, header, fd, data, version):
        # The http response.
        response = Response()
        response.set_response('HTTP/1.1 200 OK')

        HTML = render('show.jinja', posts=DB.iteritems())

        # Add a body.
        response.add_data(HTML)

        send_response(con, str(response))
예제 #8
0
    def send_base(self, con, header, fd, data, version):
        # The http response.
        response = Response()
        response.set_response('HTTP/1.1 200 OK')

        HTML = """ <html> 
                   <body>
                   <p> It is simple :P </p>
                   </body> </html>
               """

        response.add_data(HTML)

        # This function should be called just once.
        send_response(con, response)