Skip to content

Commit 0896f78

Browse files
committed
fix #2: update file_name in its function signature
1 parent ce50479 commit 0896f78

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

Diff for: README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pyexcel-webio
33
==============
44

5-
.. image:: https://api.travis-ci.org/chfw/pyexcel-webio.png
5+
.. image:: https://api.travis-ci.org/pyexcel/pyexcel-webio.png
66
:target: http://travis-ci.org/chfw/pyexcel-webio
77

88
.. image:: https://coveralls.io/repos/chfw/pyexcel-webio/badge.png?branch=master

Diff for: pyexcel_webio/__init__.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,15 @@ def load_book(self, field_name=None, **keywords):
237237
return None
238238

239239

240-
def dummy_func(content, content_type=None, status=200):
240+
def dummy_func(content, content_type=None, status=200, file_name=None):
241241
return None
242242

243243

244244
ExcelResponse = dummy_func
245245

246246

247-
def make_response(pyexcel_instance, file_type, status=200, **keywords):
247+
def make_response(pyexcel_instance, file_type,
248+
status=200, file_name=None, **keywords):
248249
"""
249250
Make a http response from a pyexcel instance of
250251
:class:`~pyexcel.Sheet` or :class:`~pyexcel.Book`
@@ -269,11 +270,11 @@ def make_response(pyexcel_instance, file_type, status=200, **keywords):
269270
io.seek(0)
270271
return ExcelResponse(io.read(),
271272
content_type=FILE_TYPE_MIME_TABLE[file_type],
272-
status=status)
273+
status=status, file_name=file_name)
273274

274275

275-
def make_response_from_array(array,
276-
file_type, status=200,
276+
def make_response_from_array(array, file_type,
277+
status=200, file_name=None,
277278
**keywords):
278279
"""
279280
Make a http response from an array
@@ -287,8 +288,8 @@ def make_response_from_array(array,
287288
file_type, status, **keywords)
288289

289290

290-
def make_response_from_dict(adict,
291-
file_type, status=200,
291+
def make_response_from_dict(adict, file_type,
292+
status=200, file_name=None,
292293
**keywords):
293294
"""
294295
Make a http response from a dictionary of lists
@@ -303,8 +304,8 @@ def make_response_from_dict(adict,
303304
file_type, status, **keywords)
304305

305306

306-
def make_response_from_records(records,
307-
file_type, status=200,
307+
def make_response_from_records(records, file_type,
308+
status=200, file_name=None,
308309
**keywords):
309310
"""
310311
Make a http response from a list of dictionaries
@@ -336,7 +337,7 @@ def make_response_from_book_dict(adict,
336337

337338

338339
def make_response_from_query_sets(query_sets, column_names,
339-
file_type, status=200,
340+
file_type, status=200, file_name=None,
340341
**keywords):
341342
"""
342343
Make a http response from a dictionary of two dimensional
@@ -370,7 +371,7 @@ def make_response_from_a_table(session, table,
370371

371372

372373
def make_response_from_tables(session, tables,
373-
file_type, status=200,
374+
file_type, status=200, file_name=None,
374375
**keywords):
375376
"""
376377
Make a http response from sqlalchmy tables

0 commit comments

Comments
 (0)