def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) self.set_header("Content-Type", "text/html; charset=utf-8") self.set_header("Access-Control-Allow-Origin", "*") self.set_header("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding") self.set_header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, HEAD") self.set_header("Vary", "Origin")
def __init__(self, application, request): RequestHandler.__init__(self, application, request) self._current_user = None self.middleware_manager = MiddlewareManager(self) self._is_threaded = False self._is_whirlwind_finished = False self.view = {}
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) self._current_user_read = False self._current_user_write = False self.loader = tornado.template.Loader('frontend/')
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) _headers = self.request.headers self.ProductID = _headers.get(mn.MN_PRODUCT_ID, '') self.RequestID = _headers.get(mn.MN_REQUEST_ID, '') self._timeout = None self._instance = application._instance
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) self.userDb = UsersDB(self.application) self.postDb = PostsDB(self.application) self.set_header("Content-Type", "application/json")
def __init__(self, application, request, **kwargs): self._prepare = [] self._on_finish = [] self._payload = kwargs RequestHandler.__init__(self, application, request)
def __init__(self, application, request): RequestHandler.__init__(self, application, request) self._current_user = None self.middleware_manager = MiddlewareManager(self) self._is_threaded = False self._is_toolstar_finished = False self.view = dotdict() self.db = Mongo.db.ui #@UndefinedVariable
def __init__(self, application, request): RequestHandler.__init__(self, application, request) self._current_user = None self.middleware_manager = MiddlewareManager(self) self._is_threaded = False self._is_whirlwind_finished = False self.view = dotdict() self.db = Mongo.db.ui #@UndefinedVariable
def __init__(self, *args, **kwargs): RequestHandler.__init__(self, *args, **kwargs) UrlHandler.__init__(self) self.template_var = {} self.log_var = OrderedDict() self.errno = 0
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) _headers = self.request.headers self.mn_server = _headers.get(MN_INSTANCE_SERVER,'') self.mn_port = _headers.get(MN_INSTANCE_PORT,'') self.ProductID = _headers.get(MN_PRODUCT_ID,'') self._instance = application._instance self._search_count = 2 self._not_found_callback = self._response_no_agent
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) _headers = self.request.headers self.mn_server = _headers.get(MN_INSTANCE_SERVER, '') self.mn_port = _headers.get(MN_INSTANCE_PORT, '') self.ProductID = _headers.get(MN_PRODUCT_ID, '') self._instance = application._instance self._search_count = 2 self._not_found_callback = self._response_no_agent
def __init__(self, application, request): RequestHandler.__init__(self, application, request) self._current_user = None # self._username = None # self._keep_logged_in=False self.middleware_manager = MiddlewareManager(self) self._is_threaded = False self._is_toolstar_finished = False self._is_threaded = False self.view = dotdict() self.db = Mongo.ui
def __init__(self, application, request, **kwargs): BaseRequestHandler.__init__(self, application, request, **kwargs) self.db = application.database if not self.template_env: self.template_env = Environment(loader=FileSystemLoader(convention.template_path)) self.session = None session_id = self.get_cookie(self.SESSIONID) if session_id: self.session = Session.get_session(session_id)
def __init__(self, application, request, **kwds): self.allowed_arugments: dict = {k.value: {} for k in RESTfulMethodType} # allow any arguments self.required_arugments: dict = { k.value: [] for k in RESTfulMethodType} # not require any arguments self.app_name = application.settings.get('name', None) ControllerAddon.__init__(self, application, request, **kwds) RequestHandler.__init__(self, application, request, **kwds) self.__cache: dict = None
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) self.account_dao = self.settings['account_dao'] self.job_dao = self.settings['job_dao'] self.config_dao = self.settings['config_dao'] self.job_timer = self.settings['job_timer'] self.account_info = None self.psd_question = None self.cookie_expires_days = 10 self.end_notification = Exception('finish notification') self.push_server = self.settings['push_server'] self.need_redirect_login = True
def __init__(self, application, request, **kwargs): #TODO: This is really hacky, must be a more elegant wy to build up the path name thisModule = __import__(self.__module__) mods = self.__module__.split('.') thisAppName = mods[mods.index('Apps') + 1] template_path = 'Apps/%s/templates/' % (thisAppName) self.module_template_path = template_path self.application = application RequestHandler.__init__(self, application, request, **kwargs)
def __init__(self, *args, **kwargs): """ Instantiation of request handlers passes all ``*args`` and ``**kwargs`` to :class:`.CoreBaseHandler` and :mod:`tornado` handler instantiation method. """ try: self.rsc_id = kwargs.pop("_rsc_id") except KeyError: self.rsc_id = None CoreBaseHandler.__init__(self, *args, **kwargs) RequestHandler.__init__(self, *args, **kwargs)
def __init__(self, application, request, **kwargs): #TODO: This is really hacky, must be a more elegant wy to build up the path name thisModule = __import__(self.__module__) mods = self.__module__.split('.') thisAppName = mods[mods.index('Apps') +1] template_path = 'Apps/%s/templates/' % (thisAppName) self.module_template_path = template_path self.application = application RequestHandler.__init__(self, application, request,**kwargs)
def __init__(self, application, request, **kwargs): """ Constructor. See `web.py <https://github.com/tornadoweb/tornado/blob/master/tornado/web.py>`_. """ if 'ut_logged' in kwargs: # For unit test, we impose a logged user. self._logged_user = kwargs['ut_logged']['user'] del kwargs['ut_logged'] if 'dbman' in kwargs: self._db = kwargs['dbman'] del kwargs['dbman'] RequestHandler.__init__(self, application, request, **kwargs) self._app_log = logging.getLogger("tornado.application")
def __init__(self, application, request, **kwargs): self.sqlalchemy_session = None self.login_user = None RequestHandler.__init__(self, application, request, **kwargs)
def __init__(self, rpc_handler, *args, **kwargs): if not issubclass(rpc_handler, RpcHandler): raise Exception("Argument rpc_handler must be a subclass of " + "RpcHandler") self.rpc_handler = rpc_handler() RequestHandler.__init__(self, *args, **kwargs)
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs)
def __init__(self, _application, request, **kwargs): RequestHandler.__init__(self, _application, request) self.accounts = kwargs['accounts']
def __init__(self, output, *args): self.output = output RequestHandler.__init__(self, *args)
def __init__(self, *args, **kwargs): BaseRequestHandler.__init__(self, *args, **kwargs) if not self.template_env: self.template_env = Environment(loader = FileSystemLoader(self.application.settings['template_path']))
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) self.set_header('Content-Type', 'text/json') if self.settings['allow_remote_access']: self.access_control_allow()
def __init__(self, master_ip): RequestHandler.__init__(self) self.master = master_ip
def __init__(self, application, request, wrapper, fuzzer): RequestHandler.__init__(self, application, request) self.wrapper = wrapper self.fuzzer = fuzzer
def __init__(self, application, request, **kwargs): if application.settings['db_user']: Document.set_db(application.couchdb) RequestHandler.__init__(self, application, request) self.output = kwargs.get('output','page') self.set_header("Content-Type", self.mime_type[self.output])
def __init__(self, application, request, **kwargs): self.logger = logging.getLogger(__name__) RequestHandler.__init__(self, application, request, **kwargs)
def __init__(self, *args, **kwargs): UserMixin.__init__(self) RequestHandler.__init__(self, *args, **kwargs)
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request) self._payload = kwargs
def __init__(self, *args, **kwargs): _RequestHandler.__init__(self, *args, **kwargs) self.environ = WSGIContainer.environ(self.request)
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) self.context = Context(self)
def __init__(self, *args, **kwargs): RequestHandler.__init__(self, *args, **kwargs)
def __init__(self, application, request, **kwargs): self.path = None RequestHandler.__init__(self, application, request, **kwargs)
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) # TODO: REMOVE? self.access_control_allow()
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) self.set_header('Content-Type', 'text/json')
def __init__(self, *args, **kwargs): RequestHandler.__init__(self, *args, **kwargs) self._session = None
def __init__(self, application, request, **kwargs): self.controller = None self.domain = application.domain RequestHandler.__init__(self, application, request, **kwargs)
def __init__(self, application, request, webpy_app): RequestHandler.__init__(self, application, request) self.webpy_app = webpy_app
def __init__(self, *args, **kwargs): RequestHandler.__init__(self, *args, **kwargs) self.cfg = Config()
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) self.db = self.application.db
def __init__(self, application, request, status_code): RequestHandler.__init__(self, application, request) self.set_status(status_code)
def urlhandler_init_function(self,*args,**kwargs): RequestHandler.__init__(self,*args,**kwargs) for name,fn in self._proxyfuncs.items(): setattr(self,name,partial(fn,self))
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) # init tmiddleware self.tmiddleware = TMiddleware(self)
def __init__(self, application, request, **kwargs): RequestHandler.__init__(self, application, request, **kwargs) self._sign = signature() self._deskew = imageDeskew()