def applications_page_check(request, current_page=None, path=None):
 if current_page:
  return current_page
 if (path is None):
  path = request.path_info.replace(reverse('pages-root'), '', 1)
 for lang in get_language_list():
  if path.startswith((lang + '/')):
   path = path[len((lang + '/')):]
 for resolver in APP_RESOLVERS:
  try:
   page_id = resolver.resolve_page_id(path)
   page = Page.objects.public().get(id=page_id)
   return page
  except Resolver404:
   pass
  except Page.DoesNotExist:
   pass
 return None

def applications_page_check ( request , current_page = None , path = None ) : if current_page : return current_page if ( path is None ) : path = request . path_info . replace ( reverse ( 'pages-root' ) , '' , 1 ) for lang in get_language_list ( ) : if path . startswith ( ( lang + '/' ) ) : path = path [ len ( ( lang + '/' ) ) : ] for resolver in APP_RESOLVERS : try : page_id = resolver . resolve_page_id ( path ) page = Page . objects . public ( ) . get ( id = page_id ) return page except Resolver404 : pass except Page . DoesNotExist : pass return None
tries to find if given path was resolved over application .