def resolve_route(path):
 if (path not in (u'about', u'contact')):
  context = get_page_context_from_template(path)
  if context:
   return context
  return get_page_context_from_doctype(path)
 else:
  context = get_page_context_from_doctype(path)
  if context:
   return context
  return get_page_context_from_template(path)

def resolve_route ( path ) : if ( path not in ( u'about' , u'contact' ) ) : context = get_page_context_from_template ( path ) if context : return context return get_page_context_from_doctype ( path ) else : context = get_page_context_from_doctype ( path ) if context : return context return get_page_context_from_template ( path )
returns the page route object based on searching in pages and generators .