def redirect_request_processor(page, request):
 target = page.get_redirect_to_target(request)
 if target:
  extra_path = request._feincms_extra_context.get(u'extra_path', u'/')
  if (extra_path == u'/'):
   return HttpResponseRedirect(target)
  logger.debug(u"Page redirect on '%s' not taken because extra path '%s' present", page.get_absolute_url(), extra_path)
  raise Http404()

def redirect_request_processor ( page , request ) : target = page . get_redirect_to_target ( request ) if target : extra_path = request . _feincms_extra_context . get ( u'extra_path' , u'/' ) if ( extra_path == u'/' ) : return HttpResponseRedirect ( target ) logger . debug ( u"Page redirect on '%s' not taken because extra path '%s' present" , page . get_absolute_url ( ) , extra_path ) raise Http404 ( )
returns a httpresponseredirect instance if the current page says a redirect should happen .