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))
Beispiel #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"
    )
Beispiel #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())
Beispiel #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")
Beispiel #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)
    )
Beispiel #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")
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())
Beispiel #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"
    )
Beispiel #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())
Beispiel #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)
    )
Beispiel #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()
    )