diff options
Diffstat (limited to 'jtlib/plugins/new_person_plugin.py')
-rw-r--r-- | jtlib/plugins/new_person_plugin.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/jtlib/plugins/new_person_plugin.py b/jtlib/plugins/new_person_plugin.py index 050e97a..a7cc76a 100644 --- a/jtlib/plugins/new_person_plugin.py +++ b/jtlib/plugins/new_person_plugin.py @@ -53,13 +53,10 @@ class NewPersonCommand(cliapp.Plugin): if os.path.exists(pathname): raise cliapp.AppException('File %s already exists' % pathname) - template = self.app.read_template('new_person.tmpl') + vars = { + 'name': name, + 'basename': basename, + } + rendered_template = self.app.render_template('new_person.j2', vars) with open(pathname, 'w') as f: - f.write( - template % - { - 'name': name, - 'basename': basename, - }) - - + f.write(rendered_template) |