
    `j                    H    d Z ddlmZ ddlmZ ddlmZ ddlmZ d	dZ	d
dZ
y)z;Download response helpers for generated XML export content.    )annotations)HttpResponse)IstatXmlExportResult)IstatZipExportResultc                x    t        | j                  j                  d      d      }d| j                   d|d<   |S )z)Build an in-memory XML download response.zutf-8zapplication/xmlcontent_typeattachment; filename=""Content-Disposition)r   contentencodefilenameexport_resultresponses     +/backend/istat/xml_export/http/responses.pybuild_xml_download_responser      sL     $$W-&H
 !!7!7 8: "# O    c                Z    t        | j                  d      }d| j                   d|d<   |S )z)Build an in-memory ZIP download response.zapplication/zipr   r
   r   r   )r   r   r   r   s     r   build_zip_download_responser      sA     &H
 !!7!7 8: "# Or   N)r   r   returnr   )r   r   r   r   )__doc__
__future__r   django.httpr   %istat.xml_export.models.export_resultr   )istat.xml_export.models.zip_export_resultr   r   r    r   r   <module>r      s    A " $ F J

r   