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
e3fed5a2b3
commit
9dc64ee611
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'
|
||||
if not SCRIPT_DIR in sys.path:
|
||||
sys.path.append(SCRIPT_DIR)
|
||||
import iiab_update_menus as update_menus
|
||||
import iiab_update_menus as menus
|
||||
|
||||
doc_root = get_iiab_env('WWWROOT')
|
||||
menuDefs = doc_root + "/js-menu/menu-files/menu-defs/"
|
||||
|
@ -38,10 +38,13 @@ def main():
|
|||
#print(installed_maps)
|
||||
write_osm_vector_idx(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:
|
||||
item = map_catalog['regions'][region]
|
||||
create_menu_def(region,item['perma_ref'])
|
||||
create_menu_def(region,item['perma_ref'] + '.json')
|
||||
# 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():
|
||||
global map_catalog
|
||||
|
|
Loading…
Add table
Reference in a new issue