From 3b35eb183ca5ab7dd47a084736d59dd89af733a2 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 28 Feb 2014 04:19:03 +0100 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20supe?= =?UTF-8?q?rTornado.py=20=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20video.?= =?UTF-8?q?html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superTornado.py | 5 +++++ video.html | 3 +++ 2 files changed, 8 insertions(+) diff --git a/superTornado.py b/superTornado.py index f2f7ca4..ffe41af 100644 --- a/superTornado.py +++ b/superTornado.py @@ -86,6 +86,10 @@ class AJAXHandler(BaseHandler): self.write(encoded) self.finish() +class DisconnectionHandler(BaseHandler): + def post(self): + self.set_cookie("user", 0) + self.redirect("/") application = tornado.web.Application([ @@ -93,6 +97,7 @@ application = tornado.web.Application([ (r"/video", VideoHandler), (r"/unauthorized", UnauthorizedHandler), (r"/ajax", AJAXHandler), + (r"/disconnection", DisconnectionHandler), ], cookie_secret="1213215656") if __name__ == "__main__": diff --git a/video.html b/video.html index 57899e7..f3d2254 100644 --- a/video.html +++ b/video.html @@ -27,5 +27,8 @@

Vue camera

+
+ +