diff frontends/src/quick_frontend/quick_blog.py @ 1919:d3354c80bd1f

core (tools): moved common to a separate package, and put data method in a data_format module
author Goffi <goffi@goffi.org>
date Tue, 22 Mar 2016 22:46:04 +0100
parents a754d6381550
children 2daf7b4c6756
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_blog.py	Mon Mar 21 19:44:16 2016 +0100
+++ b/frontends/src/quick_frontend/quick_blog.py	Tue Mar 22 22:46:04 2016 +0100
@@ -25,7 +25,7 @@
 from sat_frontends.quick_frontend.constants import Const as C
 from sat_frontends.quick_frontend import quick_widgets
 from sat_frontends.tools import jid
-from sat.tools import common
+from sat.tools.common import data_format
 
 try:
     # FIXME: to be removed when an acceptable solution is here
@@ -49,7 +49,7 @@
         self.title = data.get('title')
         self.title_rich = None
         self.title_xhtml = data.get('title_xhtml')
-        self.tags = list(common.dict2iter('tag', data))
+        self.tags = list(data_format.dict2iter('tag', data))
         self.content = data.get('content')
         self.content_rich = None
         self.content_xhtml = data.get('content_xhtml')
@@ -264,7 +264,7 @@
                 if value is not None:
                     mb_data[name] = value
 
-        common.iter2dict('tag', self.item.tags, mb_data)
+        data_format.iter2dict('tag', self.item.tags, mb_data)
 
         if self.blog.new_message_target not in (C.PUBLIC, C.GROUP):
             raise NotImplementedError
@@ -273,7 +273,7 @@
             mb_data["allow_comments"] = C.BOOL_TRUE
 
         if self.blog.new_message_target == C.GROUP:
-            common.iter2dict('group', self.blog.targets, mb_data)
+            data_format.iter2dict('group', self.blog.targets, mb_data)
 
         self.blog.host.bridge.mbSend(
             unicode(self.service or ''),