Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f84b7df

Browse files
committed
Improving example
1 parent 4c3bcaf commit f84b7df

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

examples/webapi2/sample.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
import webapp2
2-
import urllib2
3-
import urllib
41
import json
2+
import os
3+
import urllib
4+
import urllib2
5+
import webapp2
6+
7+
from dotenv import Dotenv
8+
9+
# Load Env variables
10+
env = None
11+
12+
try:
13+
env = Dotenv('./.env')
14+
except IOError:
15+
env = os.environ
516

617
## CHANGE THIS
718
PORT = 3000
@@ -16,7 +27,7 @@
1627
<script src="http://cdn.auth0.com/js/lock-6.6.1.min.js"></script>
1728
<script type="text/javascript">
1829
19-
var lock = new Auth0Lock({'%s', '%s'});
30+
var lock = new Auth0Lock('%s', '%s');
2031
2132
</script>
2233
<button onclick="lock.show()">Login</button>

0 commit comments

Comments
 (0)