a
    Dg                     @   s&   d dl mZ d dlmZ dddZdS )    )JsonResponse)render_to_stringNc                 C   s@   |rt di }|r*t||pi | d|d< |r8|| t|S )z "
    Render a response consisting of an HTML chunk and a JS onload chunk
    in the format required by the modal-workflow framework.
    zNPassing a js_template argument to render_modal_workflow is no longer supported)requesthtml)	TypeErrorr   updater   )r   Zhtml_templateZjs_templateZtemplate_varsZ	json_dataresponse r	   [/var/www/lab.imftr.de/x/nb_venv/lib/python3.9/site-packages/wagtail/admin/modal_workflow.pyrender_modal_workflow   s    


r   )NNN)Zdjango.httpr   Zdjango.template.loaderr   r   r	   r	   r	   r
   <module>   s    