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)
def edit_template(title, content): edit_template = Template(source=edit) edit_template.text_content = content edit_template.title = title return str(edit_template)