Skip to content

Commit 7bfdc51

Browse files
committed
update documentation
1 parent 348194e commit 7bfdc51

File tree

3 files changed

+29
-17
lines changed

3 files changed

+29
-17
lines changed

.moban.d/docs/source/index.rst.jj2

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ A minimal application may look like this:
2020

2121
.. literalinclude:: ../../examples/tiny_example.py
2222

23-
The tiny application exposes two urls: one for file upload and the other for
24-
file download. The former url presents a simple file upload html and responds
23+
The tiny application exposes four urls:
24+
25+
#. one for file upload
26+
#. three urls for file download.
27+
28+
The first url presents a simple file upload html and responds
2529
back in json with the content of the uploaded file. Here is an
26-
`example file <https://github.com/pyexcel/Flask-Excel/blob/master/examples/example_for_upload.csv>`
30+
`example file <https://github.com/pyexcel/Flask-Excel/blob/master/examples/example_for_upload.csv>`_
2731
for testing but you can upload any other excel file. The file upload handler
2832
uses `request.get_array` to parse the uploaded file and gets an array back.
2933
The parameter **file** is coded in the html form::
@@ -35,8 +39,8 @@ The parameter **file** is coded in the html form::
3539
in upload_file() function, your browser would display "Bad Request: The
3640
browser (or proxy) sent a request that this server could not understand."
3741

38-
The latter simply throws back a csv file whenever a http request is made to
39-
http://localhost:50000/download/. `excel.make_response_from_array` takes a
42+
The rest of the links simply throw back a csv file whenever a http request is made to
43+
http://localhost:50000/download/. :meth:`~excel.make_response_from_array` takes a
4044
list of lists and a file type as parameters and sets up the mime type of the
4145
http response. If you would like to give 'tsvz' a go, please change "csv" to
4246
"tsvz".
@@ -48,12 +52,12 @@ More excel file formats
4852

4953
The example application understands csv, tsv and its zipped variants: csvz and
5054
tsvz. If you would like to expand the list of supported excel file formats
51-
(see :ref:`file-format-list`) for your own application, you could include one
52-
or all of the following import lines right after **Flask-Excel** is imported::
55+
(see :ref:`file-format-list`) for your own application, you could install one
56+
or all of the following::
5357

54-
import pyexcel.ext.xls
55-
import pyexcel.ext.xlsx
56-
import pyexcel.ext.ods
58+
pip install pyexcel-xls
59+
pip install pyexcel-xlsx
60+
pip install pyexcel-ods
5761

5862
{%block tutorial%}
5963
Data import and export
@@ -71,7 +75,6 @@ Alternatively, you can find the complete example on
7175
Now let's add the following imports first::
7276

7377
from flask_sqlalchemy import SQLAlchemy # sql operations
74-
import pyexcel.ext.xls # import it to be able to handle xls file format
7578

7679
Now configure the database connection. Sqllite will be used and **tmp.db** will
7780
be used and can be found in your current working directory::

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ The highlighted features are:
8585
`pyexcel-handsontable`_ handsontable in html `handsontable`_ same as above
8686
`pyexcel-pygal`_ svg chart `pygal`_ 2.7, 3.3, 3.4, 3.5
8787
3.6, pypy
88+
`pyexcel-sortable`_ sortable table in html `csvtotable`_ same as above
8889
======================== ======================= =============== ==================
8990

9091
.. _pyexcel-io: https://github.com/pyexcel/pyexcel-io
@@ -110,6 +111,8 @@ The highlighted features are:
110111
.. _pygal: https://github.com/Kozea/pygal
111112
.. _pyexcel-matplotlib: https://github.com/pyexcel/pyexcel-matplotlib
112113
.. _matplotlib: https://matplotlib.org
114+
.. _pyexcel-sortable: https://github.com/pyexcel/pyexcel-sortable
115+
.. _csvtotable: https://github.com/vividvilla/csvtotable
113116

114117

115118
In order to manage the list of plugins installed, you need to use pip to add or remove

docs/source/index.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ The highlighted features are:
7777
`pyexcel-handsontable`_ handsontable in html `handsontable`_ same as above
7878
`pyexcel-pygal`_ svg chart `pygal`_ 2.7, 3.3, 3.4, 3.5
7979
3.6, pypy
80+
`pyexcel-sortable`_ sortable table in html `csvtotable`_ same as above
8081
======================== ======================= =============== ==================
8182

8283
.. _pyexcel-io: https://github.com/pyexcel/pyexcel-io
@@ -102,6 +103,8 @@ The highlighted features are:
102103
.. _pygal: https://github.com/Kozea/pygal
103104
.. _pyexcel-matplotlib: https://github.com/pyexcel/pyexcel-matplotlib
104105
.. _matplotlib: https://matplotlib.org
106+
.. _pyexcel-sortable: https://github.com/pyexcel/pyexcel-sortable
107+
.. _csvtotable: https://github.com/vividvilla/csvtotable
105108

106109

107110
In order to manage the list of plugins installed, you need to use pip to add or remove
@@ -169,10 +172,14 @@ A minimal application may look like this:
169172

170173
.. literalinclude:: ../../examples/tiny_example.py
171174

172-
The tiny application exposes two urls: one for file upload and the other for
173-
file download. The former url presents a simple file upload html and responds
175+
The tiny application exposes four urls:
176+
177+
#. one for file upload
178+
#. three urls for file download.
179+
180+
The first url presents a simple file upload html and responds
174181
back in json with the content of the uploaded file. Here is an
175-
`example file <https://github.com/pyexcel/Flask-Excel/blob/master/examples/example_for_upload.csv>`
182+
`example file <https://github.com/pyexcel/Flask-Excel/blob/master/examples/example_for_upload.csv>`_
176183
for testing but you can upload any other excel file. The file upload handler
177184
uses `request.get_array` to parse the uploaded file and gets an array back.
178185
The parameter **file** is coded in the html form::
@@ -184,8 +191,8 @@ The parameter **file** is coded in the html form::
184191
in upload_file() function, your browser would display "Bad Request: The
185192
browser (or proxy) sent a request that this server could not understand."
186193

187-
The latter simply throws back a csv file whenever a http request is made to
188-
http://localhost:50000/download/. `excel.make_response_from_array` takes a
194+
The rest of the links simply throw back a csv file whenever a http request is made to
195+
http://localhost:50000/download/. :meth:`~excel.make_response_from_array` takes a
189196
list of lists and a file type as parameters and sets up the mime type of the
190197
http response. If you would like to give 'tsvz' a go, please change "csv" to
191198
"tsvz".
@@ -240,7 +247,6 @@ Alternatively, you can find the complete example on
240247
Now let's add the following imports first::
241248

242249
from flask_sqlalchemy import SQLAlchemy # sql operations
243-
import pyexcel.ext.xls # import it to be able to handle xls file format
244250

245251
Now configure the database connection. Sqllite will be used and **tmp.db** will
246252
be used and can be found in your current working directory::

0 commit comments

Comments
 (0)