简体   繁体   English

django管理面板中的模型数据下载按钮

[英]Download button for model data in django admin panel

I'm not sure, but this should be simple. 我不确定,但这应该很简单。 Confusingly, googling for the ways doesn't seem to return clear and concise answers. 令人困惑的是,谷歌搜索这些方法似乎并没有返回清晰简洁的答案。

I shouldn't need to change any forms. 我不需要更改任何形式。 All I want is a custom action in the model page where all the data is listed. 我想要的是在列出所有数据的模型页面中的自定义操作。 This button should allow me to download the table as a .csv file for example. 例如,此按钮应允许我将表格下载为.csv文件。

How do I do that? 我怎么做?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM