Exemplo n.º 1
0
def logs_download():
    r = ds_api_logging.logs_download()
    redirect_url = ds_authentication.reauthenticate_check(r, ds_recipe_lib.get_base_url(1) + "/logging_page")
    if redirect_url:
        r["err"] = "Please authenticate"
        r["err_code"] = "PLEASE_REAUTHENTICATE"
        r["redirect_url"] = redirect_url
    return jsonify(r)
Exemplo n.º 2
0
def logs_list():
    r = ds_api_logging.logs_list()
    redirect_url = ds_authentication.reauthenticate_check(
        r,
        ds_recipe_lib.get_base_url(1) + "/logging_page")
    if redirect_url:
        r["err"] = "Please authenticate"
        r["err_code"] = "PLEASE_REAUTHENTICATE"
        r["redirect_url"] = redirect_url
    return jsonify(r)
Exemplo n.º 3
0
def index():
    r = py_012_embedded_tagging.send()
    redirect_url = ds_authentication.reauthenticate_check(r, ds_recipe_lib.get_base_url())
    if redirect_url:
        return redirect(redirect_url)
    if r["err"]:
        flash(r["err"])
        return redirect(ds_recipe_lib.get_base_url(2))
    else:
        return render_template('generic_sent.html', title='Embedded Tagging--Python', data=r, base_url=ds_recipe_lib.get_base_url(2))
Exemplo n.º 4
0
def get_view():
    r = py_012_embedded_tagging.get_view()
    redirect_url = ds_authentication.reauthenticate_check(r, ds_recipe_lib.get_base_url())
    if redirect_url:
        return redirect(redirect_url)
    if r["err"]:
        flash(r["err"])
        return redirect(ds_recipe_lib.get_base_url(2))
    else:
        return redirect(r["redirect_url"])
Exemplo n.º 5
0
def send():
    r = py_002_email_send_template_lib.send()
    redirect_url = ds_authentication.reauthenticate_check(r, ds_recipe_lib.get_base_url())
    if redirect_url:
        return redirect(redirect_url)
    if r["err"]:
        flash(r["err"])
        return redirect(url_for('.index')) # Note: redirect to this recipe's index page/form if there's a problem
    else:
        return render_template('generic_sent.html', title='Send Template--Python', data=r, base_url=ds_recipe_lib.get_base_url(2))
Exemplo n.º 6
0
def index():
    r = py_001_embedded_signing.send()
    redirect_url = ds_authentication.reauthenticate_check(r, ds_recipe_lib.get_base_url())
    if redirect_url:
        return redirect(redirect_url)
    if r["err"]:
        flash(r["err"])
        return redirect(ds_recipe_lib.get_base_url(2))
    else:
        return render_template('generic_sent.html', title='Embedded Signing--Python', data=r, base_url=ds_recipe_lib.get_base_url(2))
Exemplo n.º 7
0
def get_view():
    r = py_001_embedded_signing.get_view()
    redirect_url = ds_authentication.reauthenticate_check(r, ds_recipe_lib.get_base_url())
    if redirect_url:
        return redirect(redirect_url)
    if r["err"]:
        flash(r["err"])
        return redirect(ds_recipe_lib.get_base_url(2))
    else:
        return redirect(r["redirect_url"])
Exemplo n.º 8
0
def index():
    r = py_007_envelope_recipient_status_lib.start()
    redirect_url = ds_authentication.reauthenticate_check(r, ds_recipe_lib.get_base_url())
    if redirect_url:
        return redirect(redirect_url)
    if r["err"]:
        flash(r["err"])
        return redirect(ds_recipe_lib.get_base_url(2))
    else:
        return render_template('generic_show_response.html', title='EnvelopeRecipients: list--Python', data=r, base_url=ds_recipe_lib.get_base_url(2))
Exemplo n.º 9
0
def get_doc():
    r = py_001_embedded_signing.get_doc()
    redirect_url = ds_authentication.reauthenticate_check(r, ds_recipe_lib.get_base_url())
    if redirect_url:
        return redirect(redirect_url)
    if r["err"]:
        flash(r["err"])
        return redirect(ds_recipe_lib.get_base_url(2))
    else:
        response = make_response(r["pdf"])
        response.headers['Content-Type'] = 'application/pdf'
        response.headers['Content-Disposition'] = 'inline; filename={}.pdf'.format(r['filename'])
        return response