def s3_page_dict(self): """ Returns a dictionary whose keys are the S3 bucket keys and values are the HTML to be written. """ pages = {} for page in self.pages.values(): pages[page.s3_key] = render(self, page) return pages
def render_path(self, path): """ Return HTML for a given a URL fragment (ex: /services/django). If that page doesn't exist, None is returned. """ try: self.reload_pages() return render(self, self.pages[path]) except KeyError: return None
def html_page_dict(self): """ Returns a dictionary whose keys are the relative filesystem paths for each page's HTML output and values are the HTML to be written. """ pages = {} for page in self.pages.values(): pages[page.html_path] = render(self, page) return pages