summaryrefslogtreecommitdiff
path: root/jtlib/plugins/new_topic_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'jtlib/plugins/new_topic_plugin.py')
-rw-r--r--jtlib/plugins/new_topic_plugin.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/jtlib/plugins/new_topic_plugin.py b/jtlib/plugins/new_topic_plugin.py
index 4f44f2b..1114bb4 100644
--- a/jtlib/plugins/new_topic_plugin.py
+++ b/jtlib/plugins/new_topic_plugin.py
@@ -49,6 +49,9 @@ class NewTopicCommand(cliapp.Plugin):
if not os.path.exists(dirname):
os.makedirs(dirname)
- template = self.app.read_template('new_topic.tmpl')
+ vars = {
+ 'title': title,
+ }
+ rendered_template = self.app.render_template('new_topic.j2', vars)
with open(pathname, 'w') as f:
- f.write(template % {'title': title})
+ f.write(rendered_template)