Exemplo n.º 1
0
def download_media_profile(request, domain, app_id):
    if not request.app.copy_of:
        username = request.GET.get('username', 'unknown user')
        make_async_build.delay(request.app, username)
    else:
        request._always_allow_browser_caching = True
    return HttpResponse(request.app.create_profile(with_media=True))
Exemplo n.º 2
0
def download_odk_media_profile(request, domain, app_id):
    if not request.app.copy_of:
        make_async_build.delay(request.app)
    return HttpResponse(
        request.app.create_profile(is_odk=True, with_media=True),
        content_type="commcare/profile"
    )
Exemplo n.º 3
0
def download_profile(request, domain, app_id):
    """
    See ApplicationBase.create_profile

    """
    if not request.app.copy_of:
        make_async_build.delay(request.app)
    return HttpResponse(request.app.create_profile())
Exemplo n.º 4
0
def download_odk_profile(request, domain, app_id):
    """
    See ApplicationBase.create_profile

    """
    if not request.app.copy_of:
        make_async_build.delay(request.app)
    return HttpResponse(request.app.create_profile(is_odk=True),
                        content_type="commcare/profile")
Exemplo n.º 5
0
def download_media_profile(request, domain, app_id):
    if not request.app.copy_of:
        username = request.GET.get('username', 'unknown user')
        make_async_build.delay(request.app, username)
    else:
        request._always_allow_browser_caching = True
    profile = _get_profile(request)
    return HttpResponse(
        request.app.create_profile(with_media=True, build_profile_id=profile)
    )
Exemplo n.º 6
0
def download_odk_media_profile(request, domain, app_id):
    if not request.app.copy_of:
        username = request.GET.get('username', 'unknown user')
        make_async_build.delay(request.app, username)
    else:
        request._always_allow_browser_caching = True
    profile = _get_profile(request)
    return HttpResponse(request.app.create_profile(is_odk=True,
                                                   with_media=True,
                                                   build_profile_id=profile),
                        content_type="commcare/profile")
Exemplo n.º 7
0
def download_profile(request, domain, app_id):
    """
    See ApplicationBase.create_profile

    """
    if not request.app.copy_of:
        username = request.GET.get('username', 'unknown user')
        make_async_build.delay(request.app, username)
    else:
        request._always_allow_browser_caching = True
    return HttpResponse(request.app.create_profile())
Exemplo n.º 8
0
def download_odk_profile(request, domain, app_id):
    """
    See ApplicationBase.create_profile

    """
    if not request.app.copy_of:
        username = request.GET.get('username', 'unknown user')
        make_async_build.delay(request.app, username)
    else:
        request._always_allow_browser_caching = True
    profile = _get_profile(request)
    return HttpResponse(
        request.app.create_profile(is_odk=True, build_profile_id=profile),
        content_type="commcare/profile"
    )
Exemplo n.º 9
0
def download_practice_user_restore(request, domain, app_id):
    if not request.app.copy_of:
        make_async_build.delay(request.app)
    return HttpResponse(request.app.create_practice_user_restore())
Exemplo n.º 10
0
def download_media_profile(request, domain, app_id):
    if not request.app.copy_of:
        make_async_build.delay(request.app)
    return HttpResponse(
        request.app.create_profile(with_media=True)
    )
Exemplo n.º 11
0
def download_practice_user_restore(request, domain, app_id):
    if not request.app.copy_of:
        make_async_build.delay(request.app)
    return HttpResponse(
        request.app.create_practice_user_restore()
    )