[gsoc-admin] Output an email from template



commit 939e8a23b300796e18b26b90f0661aaf20fa6f7e
Author: Alexandre Franke <alexandre franke gmail com>
Date:   Wed Aug 12 11:39:16 2015 +0200

    Output an email from template

 email/email.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/email/email.py b/email/email.py
old mode 100644
new mode 100755
index 63f77b6..e5fe9aa
--- a/email/email.py
+++ b/email/email.py
@@ -1,2 +1,6 @@
 #!/usr/bin/env python3
 
+template_file = open('../data/templates/foo')
+template_text = template_file.read()
+format_dict = {'student_name': 'Rupert Monkey'}
+print(template_text.format(**format_dict))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]