def download_attachment(request): data = [[1, 2], [3, 4]] return excel.make_response_from_array( data, request.matchdict.get('file_type', 'csv'), file_name=request.matchdict.get('file_name', ''))
def upload_view(request): if request.method == 'POST': data = request.get_array(field_name='file') return excel.make_response_from_array(data, 'xls') return Response(upload_form)
def upload_view(request): if request.method == 'POST': data = request.get_array(field_name='file') return excel.make_response_from_array(data, 'xls')
def download_attachment(request): data = [[1, 2], [3, 4]] return excel.make_response_from_array( data, request.matchdict.get('file_type', 'csv'), file_name=request.matchdict.get('file_name', ''))