def setup_instance_config(self, profiles=('default',)): for profile in profiles: profile_path = '.ipython/profile_' + profile profile_path = os.path.join(self.disk_path, profile_path) if not os.path.exists(profile_path): continue nbconfig = os.path.join(profile_path, 'ipython_notebook_config.py') wsock_cfg = "c.NotebookApp.websocket_url = '" + JBoxVol.NOTEBOOK_WEBSOCK_PROTO + \ Compute.get_alias_hostname() + "'\n" JBoxVol.replace_in_file(nbconfig, "c.NotebookApp.websocket_url", wsock_cfg)
def setup_instance_config(self, profiles=('default', )): for profile in profiles: profile_path = '.ipython/profile_' + profile profile_path = os.path.join(self.disk_path, profile_path) if not os.path.exists(profile_path): continue nbconfig = os.path.join(profile_path, 'ipython_notebook_config.py') wsock_cfg = "c.NotebookApp.websocket_url = '" + JBoxVol.NOTEBOOK_WEBSOCK_PROTO + \ Compute.get_alias_hostname() + "'\n" JBoxVol.replace_in_file(nbconfig, "c.NotebookApp.websocket_url", wsock_cfg)
def get(self): args = self.get_argument('m', default=None) if args is not None: self.log_debug("setting cookies") self.unpack(args) self.set_status(status_code=204) self.finish() else: args = self.pack() url = "//" + Compute.get_alias_hostname() + "/jboxcors/?m=" + args self.log_debug("redirecting to " + url) self.redirect(url)