docs: def get(self, path):
          """get renders the notebook template if a name is given, or
          redirects to the '/files/' handler if the name is not given."""
  
          path = path.strip('/')
          self.log.info('Appmode get: %s', path)
  
          # Abort if the app path is not below configured trusted_path.
          if not path.startswith(self.trusted_path):
              self.log.warn('Appmode refused to launch %s outside trusted path %s.', path, self.trusted_path)
              raise web.HTTPError(401, 'Notebook is not within trusted Appmode path.')
  
          cm = self.contents_manager
  
          # will raise 404 on not found
          try:
              model = cm.get(path, content=False)
          except web.HTTPError as e:
              if e.status_code == 404 and 'files' in path.split('/'):
                  # 404, but '/files/' in URL, let FilesRedirect take care of it
                  return FilesRedirectHandler.redirect_to_files(self, path)
              else:
                  raise
          if model['type'] != 'notebook':
              # not a notebook, redirect to files
              return FilesRedirectHandler.redirect_to_files(self, path)
  
          # fix back button navigation
          self.add_header("Cache-Control", "cache-control: private, max-age=0, no-cache, no-store")
  
          # gather template parameters
          tmp_path = self.mk_tmp_copy(path)
          tmp_name = tmp_path.rsplit('/', 1)[-1]
          render_kwargs = {
              'notebook_path': tmp_path,
              'notebook_name': tmp_name,
              'kill_kernel': False,
              'mathjax_url': self.mathjax_url,
              'mathjax_config': self.mathjax_config,
              'show_edit_button': self.show_edit_button,
              'show_other_buttons': self.show_other_buttons,
          }
  
          # template parameters changed over time
          if hasattr(orig_handler, "get_custom_frontend_exporters"):
              get_cfw = orig_handler.get_custom_frontend_exporters
              render_kwargs['get_custom_frontend_exporters'] = get_cfw
  
          # Ok let's roll ....
          self.write(self.render_template('appmode.html', **render_kwargs))