U
    wRd                     @   s~   d dl Z d dlZd dlT e  ejejd  d  e	  e
  eedrTe  ne  d dlT d dlmZ d	ddZdS )
    N)*z/config_load.pyflushdb)commit_all_dsFc                    s    fdd}|S )Nc                    s    fdd}|S )Nc               	      sX   t dD tj}dt_t   tjjddt_	| |  rDt
  |t_W 5 Q R X d S )N/Fz.CmfPerson:00000000-0000-0000-0000-000000000001)id)APPZtest_request_contextconfigRAISE_LAZYLOADZpreprocess_requestmodels	CmfPersongetgZcurrent_personr   )argskwargsr	   )commitfunc /opt/account/patch/include.pywrapper   s    
z/app_context.<locals>.decorator.<locals>.wrapperr   )r   r   r   )r   r   	decorator   s    
zapp_context.<locals>.decoratorr   )r   r   r   r   r   app_context   s    r   )F)ossysZ
cmf.manageZinstall_traceback_email_notifyr   r   Zfrom_pyfileZcmf__path__Zstart_viewsZinit_dshasattrZ	CMF_CACHEr   Zflushallcmf.includeZcmf.data_providers.baser   r   r   r   r   r   <module>   s   

