Example #1
0
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)
Example #2
0
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
Example #3
0
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)
Example #4
0
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)
Example #5
0
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
Example #6
0
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
Example #7
0
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)
Example #8
0
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