3
( \                 @   s   d Z ddlmZmZ ddlmZ ddlmZmZ ddlm	Z	 ddl
mZ dZG dd	 d	e	ZeeeZejd
dd Zejddd ZdS )zDA blueprint module container for keeping all submodule of type tool.    )render_templateResponse)url_for)Domaingettext)PgAdminModule)bad_requestZtoolsc               @   s   e Zd Zdd ZdS )ToolsModulec             C   sL   dt dd d ddt dddddd	t dd
ddddt dddddgS )Ntranslationsztools.index)namepathZwhenzpgadmin-sqlfoldcodeZstaticz,js/codemirror/addon/fold/pgadmin-sqlfoldcode)filenameZdebuggerzslick.pgadmin.editorsz"js/slickgrid/slick.pgadmin.editorszslick.pgadmin.formattersz%js/slickgrid/slick.pgadmin.formatters)r   )self r   1/usr/share/pgadmin4/web/pgadmin/tools/__init__.pyget_own_javascripts   s$    
zToolsModule.get_own_javascriptsN)__name__
__module____qualname__r   r   r   r   r   r	      s   r	   /c               C   s   t tdS )z0Calling tools index URL directly is not allowed.z&This URL cannot be requested directly.)r   r   r   r   r   r   index8   s    r   z/translations.jsc              C   s*   t  } | j }td|jd}t|dddS )z^Return a js file that will handle translations so Flask interpolation
    can be isolated
    zjs/translations.js)r
      zapplication/javascript)ZresponseZstatusZmimetype)r   Zget_translationsr   Z_catalogr   )Zdomainr
   templater   r   r   r
   >   s    
r
   N)__doc__Zflaskr   r   r   Zflask_babelexr   r   Zpgadmin.utilsr   Zpgadmin.utils.ajaxr   ZMODULE_NAMEr	   r   Z	blueprintZrouter   r
   r   r   r   r   <module>
   s   
