modifié: superTornado.py
This commit is contained in:
parent
65ae1dcfcf
commit
d2cccd7ed1
@ -48,7 +48,9 @@ class VideoHandler(BaseHandler):
|
|||||||
self.redirect("/")
|
self.redirect("/")
|
||||||
return
|
return
|
||||||
name = tornado.escape.xhtml_escape(self.current_user)
|
name = tornado.escape.xhtml_escape(self.current_user)
|
||||||
self.render("video.html")
|
with open(path, 'rb') as f:
|
||||||
|
data = f.read()
|
||||||
|
self.write(data)
|
||||||
|
|
||||||
class UnauthorizedHandler(BaseHandler):
|
class UnauthorizedHandler(BaseHandler):
|
||||||
def get(self):
|
def get(self):
|
||||||
@ -72,9 +74,7 @@ class UnauthorizedHandler(BaseHandler):
|
|||||||
|
|
||||||
class AJAXHandler(BaseHandler):
|
class AJAXHandler(BaseHandler):
|
||||||
def get(self):
|
def get(self):
|
||||||
with open(path, 'rb') as f:
|
self.write("lol")
|
||||||
data = f.read()
|
|
||||||
self.write(data)
|
|
||||||
|
|
||||||
|
|
||||||
application = tornado.web.Application([
|
application = tornado.web.Application([
|
||||||
|
Reference in New Issue
Block a user