Mercurial > libervia-backend
changeset 2969:eafea3bcf111
jp (blog/preview): fixed call to getCurrentFile
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 27 Jun 2019 20:24:14 +0200 |
parents | 4979d1079127 |
children | 9a47a8caa280 |
files | sat_frontends/jp/cmd_blog.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/sat_frontends/jp/cmd_blog.py Sun Jun 23 17:56:57 2019 +0200 +++ b/sat_frontends/jp/cmd_blog.py Thu Jun 27 20:24:14 2019 +0200 @@ -622,13 +622,14 @@ self.edit(content_file_path, content_file_obj, mb_data=mb_data) -class Preview(base.CommandBase): +class Preview(base.CommandBase, common.BaseEdit): # TODO: need to be rewritten with template output def __init__(self, host): base.CommandBase.__init__( self, host, "preview", use_verbose=True, help=_(u"preview a blog content") ) + common.BaseEdit.__init__(self, self.host, BLOG_TMP_DIR, use_metadata=True) def add_parser_options(self): self.parser.add_argument( @@ -751,7 +752,7 @@ # which file do we need to edit? if self.args.file == "current": - self.content_file_path = self.getCurrentFile(sat_conf, self.profile) + self.content_file_path = self.getCurrentFile(self.profile) else: self.content_file_path = os.path.abspath(self.args.file)