B
    `                 @   s(   d Z ddlZdd Zdd Zdd ZdS )	z7Configure supporting modules and other common elements
    Nc             C   sT   ||krP|| }|d }|dkrPd| }|  ||d  | jtjjj||d dS )zSetup route and view for a file given in pgwui."page_name" setting,
    which is the name of the new route.

    Only files need anything done.  URLs are used as written into the
    config, and routes and assets already exist.
    typefilezpgwui_common.Zurl_path)attr
route_nameN)Z	add_routeZadd_viewpgwui_commonZviewsZ
page_viewsZ
PageViewer)configpgwui_settingsZ	page_nameZpage_settingsr   r    r	   a/home/kop/projects/devel/pgwui/test_venv/lib/python3.7/site-packages/pgwui_common/pgwui_common.pyconfigure_page   s    
r   c             C   s(   |   d }t| |d t| |d dS )z:Setup routes and views for "pgwui.xxxx_page" settings
    ZpgwuiZ	home_pageZ	menu_pageN)Zget_settingsr   )r   r   r	   r	   r
   configure_pages-   s    r   c             C   s8   |  d |  d | jdddd t|  |   dS )z+Pyramid configuration for PGWUI_Common
    Zpyramid_makoZpyramid_beakerzstatic/pgwui_commonzpgwui_common:static/i  )Zcache_max_ageN)includeZadd_static_viewr   scan)r   r	   r	   r
   	includeme5   s    

r   )__doc__Zpgwui_common.views.page_viewsr   r   r   r   r	   r	   r	   r
   <module>   s   