示例#1
0
文件: views.py 项目: j23d/kotti_link
    def redirect(self):
        """View that redirects the user to the given link. If the user
           has the edit permission a template with a hint is presented.
        """
        if has_permission(u'edit', self.context, self.request):
            kotti_link.need()
            return {}

        return HTTPFound(location=self.context.link)
示例#2
0
文件: views.py 项目: j23d/kotti_link
 def popup(self):
     """View that present the target of the given link in a popup.
     """
     kotti_link.need()
     return {}