Esempio n. 1
0
 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))
Esempio n. 2
0
 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))
Esempio n. 3
0
 def inline(self, post):
     return html.rawstr("<a href=\"%s#disqus_thread\">Comments</a>"%model.UrlTo(post))
Esempio n. 4
0
 def solo(self, post):
     return html.rawstr(cubictemp.File(
         utils.data.path("resources/disqus_solo.html"),
         permalink = post.permalink,
         account = self.account
     ))
Esempio n. 5
0
 def index(self, page):
     return html.rawstr(cubictemp.File(
         utils.data.path("resources/disqus_index.html"),
         account = self.account
     ))