コード例 #1
0
ファイル: tasks.py プロジェクト: bderenzi/commcare-hq
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)
コード例 #2
0
ファイル: views.py プロジェクト: modonnell729/commcare-hq
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
コード例 #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)
コード例 #4
0
ファイル: tasks.py プロジェクト: soitun/commcare-hq
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)
コード例 #5
0
ファイル: views.py プロジェクト: kkaczmarczyk/commcare-hq
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
コード例 #6
0
ファイル: views.py プロジェクト: atinus/commcare-hq
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
コード例 #7
0
ファイル: tasks.py プロジェクト: dimagi/commcare-hq
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)
コード例 #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