Created
September 16, 2018 20:38
-
-
Save marknagelberg/91766668fcb668c702c9080387d96538 to your computer and use it in GitHub Desktop.
render_name file for PDF Reports in Python Post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jinja2 | |
templateLoader = jinja2.FileSystemLoader(searchpath="./") | |
templateEnv = jinja2.Environment(loader=templateLoader) | |
TEMPLATE_FILE = "name.txt" | |
template = templateEnv.get_template(TEMPLATE_FILE) | |
outputText = template.render(name='Mark') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment