From 6c5eff4d2622a305f07fa7ff76e9f96a91d733a0 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Thu, 27 Feb 2014 20:53:48 +0100 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20supe?= =?UTF-8?q?rTornado.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superTornado.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/superTornado.py b/superTornado.py index d5543df..22d70bd 100644 --- a/superTornado.py +++ b/superTornado.py @@ -26,7 +26,7 @@ class MainHandler(tornado.web.RequestHandler): print '->Send visual alarm authorized user' print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")' print "->Send to client authorized user access" - self.write("authorized user access") + self.write("Authorized user access") else: ficLog.enregDansLog(iden,"Unauthorized user connection","IP TO DO") @@ -37,15 +37,16 @@ class MainHandler(tornado.web.RequestHandler): print '->Send visual alarm unauthorized user' print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")' print "->Send to client unauthorized user access" - self.write("authorized user access") - - - + self.write("Unauthorized user access") +class VideoHandler(tornado.web.RequestHandler): + def get(self): + self.write("Authorized user access") application = tornado.web.Application([ (r"/", MainHandler), + (r"/", VideoHandler), ]) if __name__ == "__main__":