def get_pages(app=None):
 pages = {}
 frappe.local.flags.in_get_all_pages = True
 folders = (frappe.local.flags.web_pages_folders or (u'www', u'templates/pages'))
 if app:
  apps = [app]
 else:
  apps = (frappe.local.flags.web_pages_apps or frappe.get_installed_apps())
 for app in apps:
  app_path = frappe.get_app_path(app)
  for start in folders:
   path = os.path.join(app_path, start)
   pages.update(get_pages_from_path(path, app, app_path))
 frappe.local.flags.in_get_all_pages = False
 return pages

def get_pages ( app = None ) : pages = { } frappe . local . flags . in_get_all_pages = True folders = ( frappe . local . flags . web_pages_folders or ( u'www' , u'templates/pages' ) ) if app : apps = [ app ] else : apps = ( frappe . local . flags . web_pages_apps or frappe . get_installed_apps ( ) ) for app in apps : app_path = frappe . get_app_path ( app ) for start in folders : path = os . path . join ( app_path , start ) pages . update ( get_pages_from_path ( path , app , app_path ) ) frappe . local . flags . in_get_all_pages = False return pages
get all pages .