xform.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:fieldsight-kobocat 作者: awemulya 项目源码 文件源码
def to_xlsform(self):
        '''Generate an XLS format XLSForm copy of this form.'''
        file_path= self.xls.name
        default_storage= get_storage_class()()

        if file_path != '' and default_storage.exists(file_path):
            with default_storage.open(file_path) as xlsform_file:
                if file_path.endswith('.csv'):
                    xlsform_io = convert_csv_to_xls(xlsform_file.read())
                else:
                    xlsform_io= io.BytesIO(xlsform_file.read())
            return xlsform_io
        else:
            return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号