# # -*- coding:utf-8 -*-
#
# import tornado.web
# import tornado.ioloop
# from tornado.web import Application
# from model_data_api.handler import test_handler,ModelsData_Handler
# from model_data_test.settings import *
# from model_data_test.activator import process,processHandler
# from tornado.web import RequestHandler, url
# class LogFormatter(tornado.log.LogFormatter):
#     def __init__(self):
#         print('%(color)s[%(asctime)s %(filename)s:%(funcName)s:%(lineno)d %(levelname)s]%(end_color)s %(message)s')
#         super(LogFormatter, self).__init__(
#                 fmt='%(color)s[%(asctime)s %(filename)s:%(funcName)s:%(lineno)d %(levelname)s]%(end_color)s %(message)s',
#                 datefmt='%Y-%m-%d %H:%M:%S'
#         )
#
# class indexHandler(tornado.web.RequestHandler):  #定义一个类，继承tornado.web下的RequestHandler类
#     def get(self,num,nid):                                              #get()方法，接收get方式请求
#         print(num,nid)
#         self.render("index.html")                               #显示index.html文件
#
#
# class Application(tornado.web.Application):
#     def __init__(self):
#         handlers = [
#             (r"/index", test_handler.MainHandler),
#             url(r"/story/([0-9]+)", test_handler.StoryHandler),
#             url(r"/(?P<app>\w+)/(?P<function>\w+)", processHandler),
#             # url(r'/api/model',ModelsData_Handler.ModelsDataHandler)
#         ]
#         settings = common
#         tornado.web.Application.__init__(self, handlers,**settings)
#
#
#
#
#
