@@ -237,14 +237,15 @@ def load_book(self, field_name=None, **keywords):
237
237
return None
238
238
239
239
240
- def dummy_func (content , content_type = None , status = 200 ):
240
+ def dummy_func (content , content_type = None , status = 200 , file_name = None ):
241
241
return None
242
242
243
243
244
244
ExcelResponse = dummy_func
245
245
246
246
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 ):
248
249
"""
249
250
Make a http response from a pyexcel instance of
250
251
:class:`~pyexcel.Sheet` or :class:`~pyexcel.Book`
@@ -269,11 +270,11 @@ def make_response(pyexcel_instance, file_type, status=200, **keywords):
269
270
io .seek (0 )
270
271
return ExcelResponse (io .read (),
271
272
content_type = FILE_TYPE_MIME_TABLE [file_type ],
272
- status = status )
273
+ status = status , file_name = file_name )
273
274
274
275
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 ,
277
278
** keywords ):
278
279
"""
279
280
Make a http response from an array
@@ -287,8 +288,8 @@ def make_response_from_array(array,
287
288
file_type , status , ** keywords )
288
289
289
290
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 ,
292
293
** keywords ):
293
294
"""
294
295
Make a http response from a dictionary of lists
@@ -303,8 +304,8 @@ def make_response_from_dict(adict,
303
304
file_type , status , ** keywords )
304
305
305
306
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 ,
308
309
** keywords ):
309
310
"""
310
311
Make a http response from a list of dictionaries
@@ -336,7 +337,7 @@ def make_response_from_book_dict(adict,
336
337
337
338
338
339
def make_response_from_query_sets (query_sets , column_names ,
339
- file_type , status = 200 ,
340
+ file_type , status = 200 , file_name = None ,
340
341
** keywords ):
341
342
"""
342
343
Make a http response from a dictionary of two dimensional
@@ -370,7 +371,7 @@ def make_response_from_a_table(session, table,
370
371
371
372
372
373
def make_response_from_tables (session , tables ,
373
- file_type , status = 200 ,
374
+ file_type , status = 200 , file_name = None ,
374
375
** keywords ):
375
376
"""
376
377
Make a http response from sqlalchmy tables
0 commit comments