Ejemplo n.º 1
0
    def __init__(self, routes, settings, db_conn=None):
        # Generate API Documentation
        api_doc_gen(routes)

        # Unless gzip was specifically set to False in settings, enable it
        if "gzip" not in list(settings.keys()):
            settings["gzip"] = True

        tornado.web.Application.__init__(self, routes, **settings)

        self.db_conn = db_conn
Ejemplo n.º 2
0
    def __init__(self, routes, settings, db=None):
        # Generate API Documentation
        api_doc_gen(routes)

        # Unless compress_response was specifically set to False in
        # settings, enable it
        compress_response = "compress_response" if TORNADO_MAJOR >= 4 else "gzip"
        if compress_response not in settings:
            settings[compress_response] = True

        tornado.web.Application.__init__(self, routes, **settings)

        self.db = db
Ejemplo n.º 3
0
    def __init__(self, routes, settings, db_conn=None):
        # Generate API Documentation
        api_doc_gen(routes)

        # Unless gzip was specifically set to False in settings, enable it
        if "gzip" not in list(settings.keys()):
            settings["gzip"] = True

        tornado.web.Application.__init__(
            self,
            routes,
            **settings
        )

        self.db_conn = db_conn
Ejemplo n.º 4
0
    def __init__(self, routes, settings, db_conn=None):
        # Generate API Documentation
        api_doc_gen(routes)

        # Unless compress_response was specifically set to False in
        # settings, enable it
        compress_response = "compress_response" if TORNADO_MAJOR >= 4 else "gzip"
        if compress_response not in settings:
            settings[compress_response] = True

        tornado.web.Application.__init__(
            self,
            routes,
            **settings
        )

        self.db_conn = db_conn