modifié: superTornado.py
This commit is contained in:
parent
044dc77a71
commit
4df402ca1c
@ -42,7 +42,7 @@ class MainHandler(BaseHandler):
|
|||||||
print "->An unauthorized user try to access"
|
print "->An unauthorized user try to access"
|
||||||
self.redirect("/unauthorized")
|
self.redirect("/unauthorized")
|
||||||
|
|
||||||
class VideoHandler(BaseHandler):
|
class VideoHandler(BaseHandler,tornado.websocket.WebSocketHandler):
|
||||||
def get(self):
|
def get(self):
|
||||||
if not self.current_user :
|
if not self.current_user :
|
||||||
self.redirect("/")
|
self.redirect("/")
|
||||||
@ -109,7 +109,7 @@ class VideoHandler(BaseHandler):
|
|||||||
self.write_message("error")
|
self.write_message("error")
|
||||||
|
|
||||||
|
|
||||||
class UnauthorizedHandler(BaseHandler,tornado.websocket.WebSocketHandler):
|
class UnauthorizedHandler(BaseHandler):
|
||||||
def get(self):
|
def get(self):
|
||||||
self.render("v/illegal.html")
|
self.render("v/illegal.html")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user