diff options
Diffstat (limited to 'day7/templater.py')
| -rw-r--r-- | day7/templater.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/day7/templater.py b/day7/templater.py new file mode 100644 index 0000000..92fb87f --- /dev/null +++ b/day7/templater.py @@ -0,0 +1,5 @@ +def render_template(template_name, **kwargs): + with open(f'templates/{template_name}.html') as f: + data = f.read() + + return data.format(**kwargs) |