From 78cb7aa6dba472e7e7a41d2f4652c70bfeb8bb3a Mon Sep 17 00:00:00 2001 From: dalepotter Date: Mon, 16 Jan 2017 23:34:11 +0000 Subject: [PATCH 1/2] [#74] Add example to load jinja template from file --- docs/examples.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/examples.rst b/docs/examples.rst index d50e7d2..5c304ce 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -45,6 +45,7 @@ Use templates: message.send(to=('John Brown', 'jbrown@gmail.com'), render={'name': 'John Brown', 'billno': '141051906163'}) +The :code:`JinjaTemplate` constructor expects a unicode string as the first argument. Therefore templates stored in external files can be added using :code:`T(open('template.html').read())`. Add DKIM signature: From 8e00ed1d43e40e48a44fe195c19466c258cbd995 Mon Sep 17 00:00:00 2001 From: dalepotter Date: Mon, 16 Jan 2017 23:34:43 +0000 Subject: [PATCH 2/2] Add detail to readme --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index e79b97e..fbb7d27 100644 --- a/README.rst +++ b/README.rst @@ -23,7 +23,7 @@ send message and get response from smtp server: and more: * DKIM signature -* Render body from template +* Render email subject and body using Jinja templates * Flask extension and Django integration * Message body transformation methods * Load message from url or from file