Skip to content

Commit c440b12

Browse files
author
robert-knight
committed
Added quickstart code to app\views.py, fixed issues per code review, updated readme to new path
1 parent d072fe5 commit c440b12

File tree

4 files changed

+40
-35
lines changed

4 files changed

+40
-35
lines changed

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,108 +6,108 @@ This repo is a Python 3 application that demonstrates:
66

77

88
1. **Embedded Signing Ceremony.**
9-
[Source.](./app/examples/eg001_embedded_signing/controller.py)
9+
[Source.](./app/eg001_embedded_signing/controller.py)
1010
This example sends an envelope, and then uses an embedded signing ceremony for the first signer.
1111
With embedded signing, the DocuSign signing ceremony is initiated from your website.
1212
1. **Send an envelope with a remote (email) signer and cc recipient.**
13-
[Source.](./app/examples/eg002_signing_via_email/controller.py)
13+
[Source.](./app/eSignature/examples/eg002_signing_via_email/controller.py)
1414
The envelope includes a pdf, Word, and HTML document.
1515
Anchor text ([AutoPlace](https://support.docusign.com/en/guides/AutoPlace-New-DocuSign-Experience)) is used to position the signing fields in the documents.
1616
1. **List envelopes in the user's account.**
17-
[Source.](./app/examples/eg003_list_envelopes/controller.py)
17+
[Source.](./app/eSignature/examples/eg003_list_envelopes/controller.py)
1818
The envelopes' current status is included.
1919
1. **Get an envelope's basic information.**
20-
[Source.](./app/examples/eg004_envelope_info/controller.py)
20+
[Source.](./app/eSignature/examples/eg004_envelope_info/controller.py)
2121
The example lists the basic information about an envelope, including its overall status.
2222
1. **List an envelope's recipients**
23-
[Source.](./app/examples/eg005_envelope_recipients/controller.py)
23+
[Source.](./app/eSignature/examples/eg005_envelope_recipients/controller.py)
2424
Includes current recipient status.
2525
1. **List an envelope's documents.**
26-
[Source.](./app/examples/eg006_envelope_docs/controller.py)
26+
[Source.](./app/eSignature/examples/eg006_envelope_docs/controller.py)
2727
1. **Download an envelope's documents.**
28-
[Source.](./app/examples/eg007_envelope_get_doc/controller.py)
28+
[Source.](./app/eSignature/examples/eg007_envelope_get_doc/controller.py)
2929
The example can download individual
3030
documents, the documents concatenated together, or a zip file of the documents.
3131
1. **Programmatically create a template.**
32-
[Source.](./app/examples/eg008_create_template/controller.py)
32+
[Source.](./app/eSignature/examples/eg008_create_template/controller.py)
3333
1. **Send an envelope using a template.**
34-
[Source.](./app/examples/eg009_use_template/controller.py)
34+
[Source.](./app/eSignature/examples/eg009_use_template/controller.py)
3535
1. **Send an envelope and upload its documents with multipart binary transfer.**
36-
[Source.](./app/examples/eg010_send_binary_docs/controller.py)
36+
[Source.](./app/eSignature/examples/eg010_send_binary_docs/controller.py)
3737
Binary transfer is 33% more efficient than using Base64 encoding.
3838
1. **Embedded sending.**
39-
[Source.](./app/examples/eg011_embedded_sending/controller.py)
39+
[Source.](./app/eSignature/examples/eg011_embedded_sending/controller.py)
4040
Embeds the DocuSign web tool (NDSE) in your web app to finalize or update
4141
the envelope and documents before they are sent.
4242
1. **Embedded DocuSign web tool (NDSE).**
43-
[Source.](./app/examples/eg012_embedded_console/controller.py)
43+
[Source.](./app/eSignature/examples/eg012_embedded_console/controller.py)
4444
1. **Embedded Signing Ceremony from a template with an added document.**
45-
[Source.](./app/examples/eg013_add_doc_to_template/controller.py)
45+
[Source.](./app/eSignature/examples/eg013_add_doc_to_template/controller.py)
4646
This example sends an envelope based on a template.
4747
In addition to the template's document(s), the example adds an
4848
additional document to the envelope by using the
4949
[Composite Templates](https://developers.docusign.com/esign-rest-api/guides/features/templates#composite-templates)
5050
feature.
5151
1. **Payments example: an order form, with online payment by credit card.**
52-
[Source.](./app/examples/eg014_collect_payment/controller.py)
52+
[Source.](./app/eSignature/examples/eg014_collect_payment/controller.py)
5353
1. **Get the envelope tab data.**
5454
Retrieve the tab (field) values for all of the envelope's recipients.
55-
[Source.](./app/examples/eg015_envelope_tab_data/controller.py)
55+
[Source.](./app/eSignature/examples/eg015_envelope_tab_data/controller.py)
5656
1. **Set envelope tab values.**
5757
The example creates an envelope and sets the initial values for its tabs (fields). Some of the tabs
5858
are set to be read-only, others can be updated by the recipient. The example also stores
5959
metadata with the envelope.
60-
[Source.](./app/examples/eg016_set_tab_values/controller.py)
60+
[Source.](./app/eSignature/examples/eg016_set_tab_values/controller.py)
6161
1. **Set template tab values.**
6262
The example creates an envelope using a template and sets the initial values for its tabs (fields).
6363
The example also stores metadata with the envelope.
64-
[Source.](./app/examples/eg017_set_template_tab_values/controller.py)
64+
[Source.](./app/eSignature/examples/eg017_set_template_tab_values/controller.py)
6565
1. **Get the envelope custom field data (metadata).**
6666
The example retrieves the custom metadata (custom data fields) stored with the envelope.
67-
[Source.](./app/examples/eg018_envelope_custom_field_data/controller.py)
67+
[Source.](./app/eSignature/examples/eg018_envelope_custom_field_data/controller.py)
6868
1. **Requiring an Access Code for a Recipient**
69-
[Source.](./app/examples/eg019_access_code_authentication/controller.py)
69+
[Source.](./app/eSignature/examples/eg019_access_code_authentication/controller.py)
7070
This example sends an envelope that requires an access-code for the purpose of multi-factor authentication.
7171
1. **Requiring SMS authentication for a recipient**
72-
[Source.](./app/examples/eg020_sms_authentication/controller.py)
72+
[Source.](./app/eSignature/examples/eg020_sms_authentication/controller.py)
7373
This example sends an envelope that requires entering in a six digit code from an text message for the purpose of multi-factor authentication.
7474
1. **Requiring Phone authentication for a recipient**
75-
[Source.](./app/examples/eg021_phone_authentication/controller.py)
75+
[Source.](./app/eSignature/examples/eg021_phone_authentication/controller.py)
7676
This example sends an envelope that requires entering in a voice-based response code for the purpose of multi-factor authentication.
7777
1. **Requiring Knowledge-Based Authentication (KBA) for a Recipient**
78-
[Source.](./app/examples/eg022_kba_authentication/controller.py)
78+
[Source.](./app/eSignature/examples/eg022_kba_authentication/controller.py)
7979
This example sends an envelope that requires passing a Public records check to validate identity for the purpose of multi-factor authentication.
8080
1. **Requiring ID Verification (IDV) for a recipient**
81-
[Source.](./app/examples/eg023_idv_authentication/controller.py)
81+
[Source.](./app/eSignature/examples/eg023_idv_authentication/controller.py)
8282
This example sends an envelope that requires submitting a photo of a government issued id for the purpose of multi-factor authentication.
8383
1. **Creating a permission profile**
84-
[Source.](./app/examples/eg024_permissions_creating/controller.py)
84+
[Source.](./app/eSignature/examples/eg024_permissions_creating/controller.py)
8585
This code example demonstrates how to create a permission profile using the [Create Permission Profile](https://developers.docusign.com/esign-rest-api/reference/Accounts/AccountPermissionProfiles/create) method.
8686
1. **Setting a permission profile**
87-
[Source.](./app/examples/eg025_permissions_set_user_group/controller.py)
87+
[Source.](./app/eSignature/examples/eg025_permissions_set_user_group/controller.py)
8888
This code example demonstrates how to set a user group’s permission profile using the [Update Group](https://developers.docusign.com/esign-rest-api/reference/UserGroups/Groups/update) method.
8989
You must have already created the permissions profile and the group of users.
9090
1. **Updating individual permission settings**
91-
[Source.](./app/examples/eg026_permissions_change_single_setting/controller.py)
91+
[Source.](./app/eSignature/examples/eg026_permissions_change_single_setting/controller.py)
9292
This code example demonstrates how to edit individual permission settings on a permissions profile using the [Update Permission Profile](https://developers.docusign.com/esign-rest-api/reference/Accounts/AccountPermissionProfiles/update) method.
9393
1. **Deleting a permission profile**
94-
[Source.](./app/examples/eg027_permissions_delete/controller.py)
94+
[Source.](./app/eSignature/examples/eg027_permissions_delete/controller.py)
9595
This code example demonstrates how to delete a permission profile using the [Delete Permission Profile](https://developers.docusign.com/esign-rest-api/reference/Accounts/AccountPermissionProfiles/create) method.
9696
1. **Creating a brand**
97-
[Source.](./app/examples/eg028_brand_creating/controller.py)
97+
[Source.](./app/eSignature/examples/eg028_brand_creating/controller.py)
9898
This example creates brand profile for an account using the [Create Brand](https://developers.docusign.com/esign-rest-api/reference/Accounts/AccountBrands/create) method.
9999
1. **Applying a brand to an envelope**
100-
[Source.](./app/examples/eg029_brands_apply_to_envelope/controller.py)
100+
[Source.](./app/eSignature/examples/eg029_brands_apply_to_envelope/controller.py)
101101
This code example demonstrates how to apply a brand you've created to an envelope using the [Create Envelope](https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create) method.
102102
First, creates the envelope and then applies the brand to it.
103103
Anchor text ([AutoPlace](https://support.docusign.com/en/guides/AutoPlace-New-DocuSign-Experience)) is used to position the signing fields in the documents.
104104
1. **Applying a brand to a template**
105-
[Source.](./app/examples/eg030_brands_apply_to_template/controller.py)
105+
[Source.](./app/eSignature/examples/eg030_brands_apply_to_template/controller.py)
106106
This code example demonstrates how to apply a brand you've created to a template using using the [Create Envelope](https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create) method.
107107
You must have already created the template and the brand.
108108
Anchor text ([AutoPlace](https://support.docusign.com/en/guides/AutoPlace-New-DocuSign-Experience)) is used to position the signing fields in the documents.
109109
1. **Bulk sending envelopes to multiple recipients**
110-
[Source.](./app/examples/eg031_bulk_send/controller.py)
110+
[Source.](./app/eSignature/examples/eg031_bulk_send/controller.py)
111111
This code example demonstrates how to send envelopes in bulk to multiple recipients using these methods:
112112
[Create Bulk Send List](https://developers.docusign.com/esign-rest-api/reference/BulkEnvelopes/BulkSend/createBulkSendList),
113113
[Create Bulk Send Request](https://developers.docusign.com/esign-rest-api/reference/BulkEnvelopes/BulkSend/createBulkSendRequest).

app/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Register OAuth
2020
app.register_blueprint(ds)
2121
# Register examples
22-
app.register_blueprint(eg001_embedded_signing.eg001)
22+
app.register_blueprint(examples.eg001)
2323
app.register_blueprint(examples.eg002)
2424
app.register_blueprint(examples.eg003)
2525
app.register_blueprint(examples.eg004)

app/ds_config_sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"gateway_display_name": "Stripe",
2626
"github_example_url": "https://github.com/docusign/code-examples-python/tree/master/app/",
2727
"documentation": "", # Use an empty string to indicate no documentation path.
28-
"quickstart": "true"
28+
"quickstart": "{QUICKSTART_VALUE}"
2929
}
3030

3131
DS_JWT = {

app/views.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
"""Defines the home page route"""
22

33
from flask import render_template, url_for, redirect, Blueprint
4+
from .ds_config import DS_CONFIG
45

56
core = Blueprint("core", __name__)
67

78

89
@core.route("/")
910
def index():
10-
return render_template("home.html", title="Home - Python Code Examples")
11-
11+
#if quickstart go to eg001 else go to homepage
12+
quickstart=DS_CONFIG["quickstart"]
13+
if quickstart == "true":
14+
return render_template("eg001_embedded_signing.html", title="Embedded signing ceremony")
15+
else:
16+
return render_template("home.html", title="Home - Python Code Examples")
1217

1318
@core.route("/index")
1419
def r_index():

0 commit comments

Comments
 (0)