Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1d60b85

Browse files
committed
Various updates
1 parent350c8a4 commit1d60b85

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ For a list of code examples that use the Web Forms API, see the [How-to guides o
7272
###Prerequisites
7373
**Note:** If you downloaded this code using[Quickstart](https://developers.docusign.com/docs/esign-rest-api/quickstart/) from the Docusign Developer Center, skip items 1 and 2 as they were automatically performed for you.
7474

75-
1. A free[Docusign developer account](https://www.docusign.com/developers/sandbox); create one if you don't already have one.
75+
1. A free[Docusign developer account](https://go.docusign.com/o/sandbox/); create one if you don't already have one.
7676
1. A Docusign app and integration key that is configured to use either[Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) or[JWT Grant](https://developers.docusign.com/platform/auth/jwt/) authentication.
7777

7878
This[video](https://www.youtube.com/watch?v=eiRI4fe5HgM) demonstrates how to obtain an integration key.

‎app/monitor/examples/eg001_get_monitoring_data.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
fromdocusign_monitorimportDataSetApi
22
fromflaskimportsession
3+
fromdatetimeimportdatetime,timedelta,timezone
34

45
fromapp.monitor.utilsimportcreate_monitor_api_client
56

@@ -25,10 +26,11 @@ def worker(args):
2526
)
2627
#ds-snippet-end:Monitor1Step2
2728
#ds-snippet-start:Monitor1Step3
29+
cursor_date=datetime.now(timezone.utc).replace(year=datetime.now(timezone.utc).year-1)
2830
dataset_api=DataSetApi(api_client=api_client)
2931

30-
cursor_value=''
31-
limit=100
32+
cursor_value=cursor_date.strftime('%Y-%m-%dT00:00:00Z')
33+
limit=2000
3234
function_results= []
3335
complete=False
3436

‎app/quick_acg/quick_acg_app/views.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ def ds_callback():
3434

3535
# Save the redirect eg if present
3636
redirect_url=session.pop("eg",None)
37-
resp=DSClient.get_token("code_grant")
37+
try:
38+
resp=DSClient.get_token("code_grant")
39+
exceptExceptionaserr:
40+
ifsession.get("pkce_failed",False):
41+
raiseerr
42+
43+
session["pkce_failed"]=True
44+
returnredirect(url_for("ds.ds_login"))
3845

3946
# app.logger.info("Authenticated with DocuSign.")
4047
session["ds_access_token"]=resp["access_token"]

‎app/quick_acg/run.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
importos
55

66
quick_acg_app.config["QUICK_ACG"]=True
7+
os.environ['OAUTHLIB_INSECURE_TRANSPORT']='1'
78

89
ifos.environ.get("DEBUG",False)=="True":
910
quick_acg_app.config["DEBUG"]=True

‎app/templates/webforms/eg001_web_form_embed.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<body>
1313
<divid="app">
1414
<divid="webform-customer-app-area">
15-
<h1id="webforms-heading">Embedded web form example</h1>
15+
<h5id="webforms-heading">{{ webforms_heading }}</h5>
1616
<divid="docusign"class="webform-iframe-container">
1717
<p>Web Form will render here</p>
1818
</div>

‎app/webforms/views/eg001_create_instance.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,16 @@ def create_web_form_instance():
5555
exceptExceptionaserror:
5656
returnprocess_error(error)
5757

58+
example=get_example_by_number(session["manifest"],example_number,api)
59+
additional_page_data=next((pforpinexample["AdditionalPage"]ifp["Name"]=="webforms_heading"),
60+
None)
61+
5862
returnrender_template(
5963
"webforms/eg001_web_form_embed.html",
6064
form_url=results.form_url,
6165
instance_token=results.instance_token,
62-
integration_key=DS_CONFIG["ds_client_id"]
66+
integration_key=DS_CONFIG["ds_client_id"],
67+
webforms_heading=additional_page_data["ResultsPageText"]
6368
)
6469

6570

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp