def download_locations_async(domain, download_id, include_consumption=False): DownloadBase.set_progress(download_locations_async, 0, 100) dump_locations(domain, download_id, include_consumption=include_consumption, task=download_locations_async) DownloadBase.set_progress(download_locations_async, 100, 100)
def location_export(request, domain): response = HttpResponse(mimetype=Format.from_format('xlsx').mimetype) response['Content-Disposition'] = 'attachment; filename=locations.xlsx' dump_locations(response, domain) return response
def download_locations_async(domain, download_id, include_consumption, headers_only): DownloadBase.set_progress(download_locations_async, 0, 100) dump_locations(domain, download_id, include_consumption=include_consumption, headers_only=headers_only, task=download_locations_async) DownloadBase.set_progress(download_locations_async, 100, 100)
def download_locations_async(domain, download_id, include_consumption, headers_only, owner_id, root_location_ids=None, **kwargs): DownloadBase.set_progress(download_locations_async, 0, 100) dump_locations(domain, download_id, include_consumption=include_consumption, owner_id=owner_id, root_location_ids=root_location_ids, headers_only=headers_only, task=download_locations_async, **kwargs) DownloadBase.set_progress(download_locations_async, 100, 100)
def location_export(request, domain): include_consumption = request.GET.get('include_consumption') == 'true' response = HttpResponse(mimetype=Format.from_format('xlsx').mimetype) response['Content-Disposition'] = 'attachment; filename="locations.xlsx"' dump_locations(response, domain, include_consumption) return response
def location_export(request, domain): response = HttpResponse(mimetype=Format.from_format('xlsx').mimetype) response['Content-Disposition'] = 'attachment; filename="locations.xlsx"' dump_locations(response, domain) return response