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)
def fset(self, val): if val: return redirect.activate(self.context, self.redirect_url) return redirect.deactivate(self.context)