Compatibility with Zope 2.12: don't wrap the ViewPageTemplate into an acquisition wrapper.

svn path=/plone.app.discussion/trunk/; revision=29201
This commit is contained in:
Carsten Senger 2009-08-20 02:09:53 +00:00
parent e946ef7979
commit 06b332a801

View File

@ -279,8 +279,7 @@ class CommentsViewlet(ViewletBase, layout.FormWrapper):
form = CommentForm
def index(self):
return ViewPageTemplateFile('comments.pt').__of__(self)(self)
index = ViewPageTemplateFile('comments.pt')
def __init__(self, context, request, view, manager):
super(CommentsViewlet, self).__init__(context, request, view, manager)
@ -375,4 +374,4 @@ class CommentsViewlet(ViewletBase, layout.FormWrapper):
# before we can call toLocalizedTime.
util = getToolByName(self.context, 'translation_service')
zope_time = DateTime(time.year, time.month, time.day, time.hour, time.minute, time.second)
return util.toLocalizedTime(zope_time, long_format=True)
return util.toLocalizedTime(zope_time, long_format=True)