comparison src/server/blog.py @ 898:2d15b484ca33

blog, browser: updated imports to reflect renaming of common.py to common/data_format.py
author Goffi <goffi@goffi.org>
date Tue, 22 Mar 2016 22:45:39 +0100
parents 06ead60cbfe0
children bc3a3e804a7a
comparison
equal deleted inserted replaced
897:6de862136eb6 898:2d15b484ca33
20 20
21 from sat.core.i18n import _, D_ 21 from sat.core.i18n import _, D_
22 from sat_frontends.tools.strings import addURLToText, fixXHTMLLinks 22 from sat_frontends.tools.strings import addURLToText, fixXHTMLLinks
23 from sat.core.log import getLogger 23 from sat.core.log import getLogger
24 log = getLogger(__name__) 24 log = getLogger(__name__)
25 from sat.tools import common 25 from sat.tools.common import data_format
26 from sat.tools import xml_tools 26 from sat.tools import xml_tools
27 from dbus.exceptions import DBusException 27 from dbus.exceptions import DBusException
28 from twisted.internet import defer 28 from twisted.internet import defer
29 from twisted.web import server 29 from twisted.web import server
30 from twisted.web.resource import Resource 30 from twisted.web.resource import Resource
749 self.url = "{}/{}".format(base_url, _quote(entry['id'])) 749 self.url = "{}/{}".format(base_url, _quote(entry['id']))
750 query_data = getDefaultQueryData(request) 750 query_data = getDefaultQueryData(request)
751 if query_data: 751 if query_data:
752 self.url += '?{}'.format(_urlencode(query_data)) 752 self.url += '?{}'.format(_urlencode(query_data))
753 self.title = self.getText(entry, 'title') 753 self.title = self.getText(entry, 'title')
754 self.tags = [sanitizeHtml(tag) for tag in common.dict2iter('tag', entry)] 754 self.tags = [sanitizeHtml(tag) for tag in data_format.dict2iter('tag', entry)]
755 755
756 count_text = lambda count: D_(u'comments') if count > 1 else D_(u'comment') 756 count_text = lambda count: D_(u'comments') if count > 1 else D_(u'comment')
757 757
758 self.comments_text = u"{} {}".format(comments_count, count_text(comments_count)) 758 self.comments_text = u"{} {}".format(comments_count, count_text(comments_count))
759 759