mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
creates menu-defs, and adds to menu.json
This commit is contained in:
parent
d648955994
commit
20743b73a1
1 changed files with 7 additions and 4 deletions
|
@ -18,7 +18,7 @@ from iiab_env import get_iiab_env
|
||||||
SCRIPT_DIR = '/opt/admin/cmdsrv/scripts'
|
SCRIPT_DIR = '/opt/admin/cmdsrv/scripts'
|
||||||
if not SCRIPT_DIR in sys.path:
|
if not SCRIPT_DIR in sys.path:
|
||||||
sys.path.append(SCRIPT_DIR)
|
sys.path.append(SCRIPT_DIR)
|
||||||
import iiab_update_menus as update_menus
|
import iiab_update_menus as menus
|
||||||
|
|
||||||
doc_root = get_iiab_env('WWWROOT')
|
doc_root = get_iiab_env('WWWROOT')
|
||||||
menuDefs = doc_root + "/js-menu/menu-files/menu-defs/"
|
menuDefs = doc_root + "/js-menu/menu-files/menu-defs/"
|
||||||
|
@ -38,10 +38,13 @@ def main():
|
||||||
#print(installed_maps)
|
#print(installed_maps)
|
||||||
write_osm_vector_idx(installed_maps)
|
write_osm_vector_idx(installed_maps)
|
||||||
for region in installed_maps:
|
for region in installed_maps:
|
||||||
print('checking for %s region'%region)
|
#print('checking for %s region'%region)
|
||||||
|
item = map_catalog['regions'][region]
|
||||||
if not region in map_menu_defs:
|
if not region in map_menu_defs:
|
||||||
item = map_catalog['regions'][region]
|
create_menu_def(region,item['perma_ref'] + '.json')
|
||||||
create_menu_def(region,item['perma_ref'])
|
# add this new menu def to home page
|
||||||
|
print('calling to insert %s.json'%item['perma_ref'])
|
||||||
|
menus.update_menu_json(item['perma_ref'])
|
||||||
|
|
||||||
def get_map_catalog():
|
def get_map_catalog():
|
||||||
global map_catalog
|
global map_catalog
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue