From 0f0e815ad1b775ff93699b695f290c562c57962f Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 24 May 2019 16:29:03 +0400 Subject: =?UTF-8?q?=D0=9C=D0=BE=D0=B4=D1=83=D0=BB=D0=B8=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B8?= =?UTF-8?q?=20http-=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=BE=D0=B2,=20?= =?UTF-8?q?=D0=B1=D0=B0=D0=B7=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BE=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D1=87=D0=B8=D0=BA=20url-=D0=BF=D1=83?= =?UTF-8?q?=D1=82=D0=B5=D0=B9.=20=D0=9E=D0=B1=D0=B5=D1=80=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D1=8B=20=D1=81=20shelve=20=D0=B1=D0=B0=D0=B7=D0=B0=D0=BC=D0=B8?= =?UTF-8?q?=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85,=20html-=D1=88=D0=B0?= =?UTF-8?q?=D0=B1=D0=BB=D0=BE=D0=BD=D0=B8=D0=B7=D0=B0=D1=82=D0=BE=D1=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day7/templater.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 day7/templater.py (limited to 'day7/templater.py') 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) -- cgit v1.2.3