docs: def resolve_redirection(self, request, context):
          """Check for redirections."""
          current_page = context['current_page']
          lang = context['lang']
          if current_page.redirect_to_url:
              return HttpResponsePermanentRedirect(current_page.redirect_to_url)
  
          if current_page.redirect_to:
              return HttpResponsePermanentRedirect(
                  current_page.redirect_to.get_url_path(lang))