예제 #1
0
    def __init__(self, context, request):
        self.context = context
        self.request = request

        self.has_info = redirect.get_info(context) is not None

        if self.request.get('destroy', None) is not None:
            redirect.deactivate(context)
            redirect._deannotate(context)
            logger.info("destroyed redirection related info for %s" % context)
예제 #2
0
 def fset(self, val):
     if val:
         return redirect.activate(self.context, self.redirect_url)
     return redirect.deactivate(self.context)