def register_site(app_name, site_name, site):
 if (app_name not in _sites_cache):
  _sites_cache[app_name] = {}
 _sites_cache[app_name][site_name] = site

def register_site ( app_name , site_name , site ) : if ( app_name not in _sites_cache ) : _sites_cache [ app_name ] = { } _sites_cache [ app_name ] [ site_name ] = site
add a site into the site dict .