format time for comments with python strftime(). no time localization so far.
svn path=/plone.app.discussion/trunk/; revision=27231
This commit is contained in:
parent
0ce270bc66
commit
0d6045682f
@ -74,8 +74,11 @@ class CommentsViewlet(ViewletBase):
|
|||||||
return '%s/login_form?came_from=%s' % (self.navigation_root_url, url_quote(self.request.get('URL', '')),)
|
return '%s/login_form?came_from=%s' % (self.navigation_root_url, url_quote(self.request.get('URL', '')),)
|
||||||
|
|
||||||
def format_time(self, time):
|
def format_time(self, time):
|
||||||
return self.context.restrictedTraverse('@@plone').toLocalizedTime(time, long_format=True)
|
# Todo: return localized time
|
||||||
|
return time.strftime("%a, %d %b %Y %H:%M")
|
||||||
|
# XXX: Not working, returns None !!!
|
||||||
|
#return self.context.restrictedTraverse('@@plone').toLocalizedTime(time, long_format=True)
|
||||||
|
|
||||||
class AddComment(BrowserView):
|
class AddComment(BrowserView):
|
||||||
"""Add a comment to a conversation
|
"""Add a comment to a conversation
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user