def run_template(self, path, home):
     last_modified = time.strftime("%d %B %Y", time.gmtime(os.path.getmtime(path)))
     t = Template(file=path)
     t.last_modified = last_modified
     t.home = home
     t.no_link = "{ font-weight: bold ; text-decoration: none; pointer-events: none; cursor: default;}"
     return t
コード例 #2
0
ファイル: templates.py プロジェクト: antroy/Home
def main_template(title, content, modified, trail="", sidebar="", version=""):
    main_template = Template(source=main)
    main_template.title = title
    main_template.text_content = content
    main_template.last_modified = modified
    main_template.trail = trail
    main_template.sidebar = sidebar
    main_template.version = version

    return str(main_template)