FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
code-examples-python/app/views.py at master · bionicstorkdemo/code-examples-python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
bionicstorkdemo
/
code-examples-python
Public
forked from
docusign/code-examples-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
code-examples-python
/
app
/
views.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (32 loc) · 1.14 KB
Breadcrumbs
code-examples-python
/
app
/
views.py
Copy path
File metadata and controls
44 lines (32 loc) · 1.14 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""Defines the home page route"""
from
flask
import
(
render_template
,
url_for
,
redirect
,
Blueprint
,
session
,
current_app
as
app
)
from
.
ds_config
import
DS_CONFIG
from
.
api_type
import
EXAMPLES_API_TYPE
from
.
docusign
import
get_manifest
core
=
Blueprint
(
"core"
,
__name__
)
@
core
.
route
(
"/"
)
def
index
():
session
[
"manifest"
]
=
get_manifest
(
DS_CONFIG
[
"example_manifest_url"
])
if
DS_CONFIG
[
"quickstart"
]
==
"true"
:
app
.
config
[
"quickstart"
]
=
False
return
redirect
(
url_for
(
"eg001.get_view"
))
if
"is_cfr"
in
session
and
session
[
"is_cfr"
]
==
"enabled"
:
return
render_template
(
"cfr_home.html"
,
title
=
"Home - Python Code Examples"
,
manifest
=
session
[
"manifest"
],
crfEnabled
=
"True"
)
else
:
return
render_template
(
"home.html"
,
title
=
"Home - Python Code Examples"
,
manifest
=
session
[
"manifest"
],
crfEnabled
=
"False"
)
@
core
.
route
(
"/index"
)
def
r_index
():
return
redirect
(
url_for
(
"core.index"
))
@
core
.
app_errorhandler
(
404
)
def
not_found_error
(
error
):
return
render_template
(
"404.html"
),
404
@
core
.
app_errorhandler
(
500
)
def
internal_error
(
error
):
return
render_template
(
"500.html"
),
500
Back
|
FazBrowse Home
|
New Git URL