摘要:
#!/usr/bin/env python # -*- coding:utf-8 -*- import tornado.ioloop import tornado.web container = {} class Session: def __init__(self,handler): self.handler = handler self.rando... 阅读全文
摘要:
#####HTML login {{status}} ####代码 #!/usr/bin/env python # -*- coding:utf-8 -*- import tornado.ioloop import tornado.web container = {} class Sessi... 阅读全文
摘要:
class Foo: def __init__(self): pass def __call__(self, *args, **kwargs): pass def __getitem__(self, item): print(item) pass def __setitem__(self, ke... 阅读全文
摘要:
class MainHandler: def __init__(self): self.host = "(.*)" self.ip = "^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$" self.port 阅读全文
摘要:
#!/usr/bin/env python # -*- coding:utf-8 -*- import tornado.ioloop import tornado.web container = {} class Session: def __init__(self,handler): self.handler = handler # 生成随机字符串 ... 阅读全文
摘要:
#!/usr/bin/env python # -*- coding:utf-8 -*- import tornado.ioloop import tornado.web container = {} class IndexHandler(tornado.web.RequestHandler): def get(self, *args, **kwargs): if se... 阅读全文
摘要:
#!/usr/bin/env python # -*- coding:utf-8 -*- import tornado.ioloop import tornado.web class IndexHandler(tornado.web.RequestHandler): def get(self, *args, **kwargs): if self.get_argument... 阅读全文
摘要:
for循环 - 特殊语言 {% for item in obj%} {{ item }} {% end %} 普通传参- 模版语言 {{ nvp }} 执行函数 - 模版语言 {{ func(nvp) }} 执行类 - 模版语言 {% module custom() %} 继承母板 -模版语言 {% extends '../master/layout.html'%} 占位符,需要... 阅读全文