gdritter repos frony-ritter-designs / 3bb2ac6
Lazily render markdown Getty Ritter 4 years ago
2 changed file(s) with 4 addition(s) and 3 deletion(s). Collapse all Expand all
8585 class design:
8686 @main
8787 def GET(self, id, slug=None):
88 id = int(id)
89 design = db.get_design(id)
88 design = db.get_design(int(id))
9089 print(design)
9190 return 'Designs', Templates.design_page(design)
9291
1111 class PageContent:
1212 def __init__(self, source):
1313 self.source = source
14 self.rendered = markdown.markdown(source)
14
15 def rendered(self):
16 return markdown.markdown(self.source)
1517
1618 class Design(typing.NamedTuple):
1719 title: str