plone.app.discussion/plone/app/discussion/browser/comment.py
Timo Stollenwerk d1bd1469c8 move comment view from browser/comments.py to browser/comment.py.
svn path=/plone.app.discussion/trunk/; revision=33214
2010-01-18 09:54:27 +00:00

16 lines
453 B
Python

from Acquisition import aq_parent
from Products.Five.browser import BrowserView
class View(BrowserView):
"""Comment View.
Redirect from /path/to/object/++conversation++default/123456789
to /path/to/object#comment-123456789.
"""
def __call__(self):
comment_id = aq_parent(self).id
self.request.response.redirect(
aq_parent(aq_parent(aq_parent(self))).absolute_url() +
'#' + str(comment_id))