Skip to content

Commit 12a21b1

Browse files
committed
Merge branch 'master' of github.com:sshwsfc/django-xadmin
2 parents 65c72f8 + c1b4217 commit 12a21b1

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

xadmin/plugins/refresh.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
1+
# coding=utf-8
2+
"""
3+
数据刷新
4+
========
15
6+
功能
7+
----
28
9+
该插件在数据列表页面提供了数据导出功能, 可以导出 Excel, CSV, XML, json 格式.
10+
11+
截图
12+
----
13+
14+
.. image:: /images/plugins/export.png
15+
16+
使用
17+
----
18+
19+
.. note:: 如果想要导出 Excel 数据, 需要安装 `xlwt <http://pypi.python.org/pypi/xlwt>`_.
20+
21+
默认情况下, xadmin 会提供 Excel, CSV, XML, json 四种格式的数据导出. 您可以通过设置 OptionClass 的 ``list_export`` 属性来指定使用
22+
哪些导出格式 (四种各使用分别用 ``xls``, ``csv``, ``xml``, ``json`` 表示), 或是将 ``list_export`` 设置为 ``None`` 来禁用数据导出功能. 示例如下::
23+
24+
class MyModelAdmin(object):
25+
26+
list_export = ('xls', xml', 'json')
27+
28+
"""
329
from django.template import loader
430

531
from xadmin.sites import site

0 commit comments

Comments
 (0)