예제 #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 {}