def _add_from_rh(self, rh_class, view_class, params, url_for_target): rh = rh_class() rh.view_class = view_class request.view_args = params with override_request_endpoint(rh.view_class.endpoint): rh._process_args() html = rh._process() self._add_page(html, rh.view_class.endpoint, url_for_target)
def _get_author(self, contrib, author): rh = RHContributionAuthor() params = {'confId': self.event.id, 'contrib_id': contrib.id, 'person_id': author.id} request.view_args = params with override_request_endpoint('contributions.display_author'): rh._process_args() html = rh._process() self._add_page(html, 'contributions.display_author', self.event, contrib_id=contrib.id, person_id=author.id)
def _get_author(self, contrib, author): rh = RHContributionAuthor() params = {'confId': self.event.id, 'contrib_id': contrib.id, 'person_id': author.id} request.view_args = params with override_request_endpoint('contributions.display_author'): rh._process_args() html = rh._process() self._add_page(html, 'contributions.display_author', self.event, contrib_id=contrib.id, person_id=author.id)
def _add_from_rh(self, rh_class, view_class, params, url_for_target): rh = rh_class() rh.view_class = view_class request.view_args = params with override_request_endpoint(rh.view_class.endpoint): rh._process_args() html = rh._process() self._add_page(html, rh.view_class.endpoint, url_for_target)
def _get_builtin_page(self, entry): obj = self._menu_offline_items.get(entry.name) if isinstance(obj, RH): request.view_args = {'confId': self.event.id} with override_request_endpoint(obj.view_class.endpoint): obj._process_args() self._add_page(obj._process(), obj.view_class.endpoint, self.event) if entry.name == 'abstracts_book' and config.LATEX_ENABLED: self._add_pdf(self.event, 'abstracts.export_boa', AbstractBook, event=self.event) if entry.name == 'program': self._add_pdf(self.event, 'tracks.program_pdf', ProgrammeToPDF, event=self.event)
def _get_builtin_page(self, entry): obj = self._menu_offline_items.get(entry.name) if isinstance(obj, RH): request.view_args = {'confId': self.event.id} with override_request_endpoint(obj.view_class.endpoint): obj._process_args() self._add_page(obj._process(), obj.view_class.endpoint, self.event) if entry.name == 'abstracts_book': self._add_pdf(self.event, 'abstracts.export_boa', AbstractBook, event=self.event) if entry.name == 'program': self._add_pdf(self.event, 'tracks.program_pdf', ProgrammeToPDF, event=self.event)