B
    ê¹`*  ã               @   s.   d Z ddlZddlmZ e e¡Zdd„ ZdS )zConfigure routing
é    Nc             C   s^   |d }d|krZd|k}x@|d   ¡ D ]0\}}|rJ|dkrJt t ¡ ¡ q&|  ||¡ q&W dS )zùAdd routes found in pgwui.routes setting

    Because settings established with Pyramid's Configurator.include()
    can be overridden by the caller, whatever configures PGWUI should
    call add_routes() after configuring all PGWUI components.
    ZpgwuiZroutesZ	menu_pageZ
pgwui_menuN)ÚitemsÚlogÚinfoÚexZMenuPageInRoutesZ	add_route)ÚconfigÚsettingsZpgwui_settingsZhave_menu_pageÚnameZroute© r	   ú[/home/kop/projects/devel/pgwui/test_venv/lib/python3.7/site-packages/pgwui_common/routes.pyÚ
add_routes   s    r   )	Ú__doc__ÚloggingZpgwui_common.exceptionsÚ
exceptionsr   Ú	getLoggerÚ__name__r   r   r	   r	   r	   r
   Ú<module>   s   
