def body(self): code = file(self.src).read() toroot = [] for i in self.pathToRoot(): if isinstance(i, PythonPage): toroot.append(i) else: break toroot.reverse() yield html.H2("/".join(i.title for i in toroot)) yield html.rawstr(self.namespace["syntax"]("py")(code))
def inline(self, post): return html.rawstr("<a href=\"%s#disqus_thread\">Comments</a>"%model.UrlTo(post))
def solo(self, post): return html.rawstr(cubictemp.File( utils.data.path("resources/disqus_solo.html"), permalink = post.permalink, account = self.account ))
def index(self, page): return html.rawstr(cubictemp.File( utils.data.path("resources/disqus_index.html"), account = self.account ))