modifié: superTornado.py
This commit is contained in:
parent
7c9ba01568
commit
1f6ffdb4ef
@ -20,13 +20,13 @@ import os
|
|||||||
confAveug = LoadConf().estAveugle()
|
confAveug = LoadConf().estAveugle()
|
||||||
ficLog = Login()
|
ficLog = Login()
|
||||||
|
|
||||||
class BaseHandler(tornado.web.RequestHandler):
|
class BaseHandler(tornado.web.RequestHandler, tornado.httpserver.HTTPRequest):
|
||||||
def get_current_user(self):
|
def get_current_user(self):
|
||||||
return self.get_secure_cookie("user")
|
return self.get_secure_cookie("user")
|
||||||
|
|
||||||
class MainHandler(BaseHandler):
|
class MainHandler(BaseHandler):
|
||||||
def get(self):
|
def get(self):
|
||||||
print "-> IP = " + self.remote_ip
|
print "-> IP = " + self.remote_ip()
|
||||||
self.render("v/index.html")
|
self.render("v/index.html")
|
||||||
|
|
||||||
def post(self):
|
def post(self):
|
||||||
|
Reference in New Issue
Block a user