Add UTF-8 BOM header to Flask-Admin export - Est's Blog
Est's BlogA simple trick to add additional bytes prepending Flask's stream_with_context
from flask_admin.contrib.sqla import ModelViewfrom itertools import chainclass MyAdminView(ModelView): can_export = True column_export_list = ['field1', 'field2'] def _export_csv(self, return_url): r = super(MyAdminView, self)._export_csv(return_url) r.response …本文章由 flowerss 抓取自RSS,版权归源站点所有。
查看原文:Add UTF-8 BOM header to Flask-Admin export - Est's Blog