modifié: superTornado.py
modifié: video.html
This commit is contained in:
parent
b2dbfa21a6
commit
3b35eb183c
@ -86,6 +86,10 @@ class AJAXHandler(BaseHandler):
|
|||||||
self.write(encoded)
|
self.write(encoded)
|
||||||
self.finish()
|
self.finish()
|
||||||
|
|
||||||
|
class DisconnectionHandler(BaseHandler):
|
||||||
|
def post(self):
|
||||||
|
self.set_cookie("user", 0)
|
||||||
|
self.redirect("/")
|
||||||
|
|
||||||
|
|
||||||
application = tornado.web.Application([
|
application = tornado.web.Application([
|
||||||
@ -93,6 +97,7 @@ application = tornado.web.Application([
|
|||||||
(r"/video", VideoHandler),
|
(r"/video", VideoHandler),
|
||||||
(r"/unauthorized", UnauthorizedHandler),
|
(r"/unauthorized", UnauthorizedHandler),
|
||||||
(r"/ajax", AJAXHandler),
|
(r"/ajax", AJAXHandler),
|
||||||
|
(r"/disconnection", DisconnectionHandler),
|
||||||
], cookie_secret="1213215656")
|
], cookie_secret="1213215656")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -27,5 +27,8 @@
|
|||||||
<body>
|
<body>
|
||||||
<h2>Vue camera</h2>
|
<h2>Vue camera</h2>
|
||||||
<div class="image"></div>
|
<div class="image"></div>
|
||||||
|
<form action="/disconnection" method="post">
|
||||||
|
<input type="submit" value="Deconnexion">
|
||||||
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user