Private
Public Access
1
0

fixed urlencode

This commit is contained in:
Sander Roosendaal
2019-03-10 19:10:42 +01:00
parent a2cf0c4698
commit d59d09093f
3 changed files with 8 additions and 7 deletions

View File

@@ -407,7 +407,7 @@ def rower_c2_authorize(request):
params = {"client_id": C2_CLIENT_ID,
"response_type": "code",
"redirect_uri": C2_REDIRECT_URI}
url = "http://log.concept2.com/oauth/authorize?"+ urllib.urlencode(params)
url = "http://log.concept2.com/oauth/authorize?"+ urllib.parse.urlencode(params)
url += "&scope="+scope
return HttpResponseRedirect(url)
@@ -424,7 +424,7 @@ def rower_strava_authorize(request):
"redirect_uri": STRAVA_REDIRECT_URI,
"scope": "activity:write,activity:read_all"}
url = "https://www.strava.com/oauth/authorize?"+ urllib.urlencode(params)
url = "https://www.strava.com/oauth/authorize?"+ urllib.parse.urlencode(params)
return HttpResponseRedirect(url)
@@ -440,7 +440,7 @@ def rower_polar_authorize(request):
"state": state,
# "scope":"accesslink.read_all"
}
url = "https://flow.polar.com/oauth2/authorization?" +urllib.urlencode(params)
url = "https://flow.polar.com/oauth2/authorization?" +urllib.parse.urlencode(params)
return HttpResponseRedirect(url)
@@ -459,7 +459,7 @@ def rower_runkeeper_authorize(request):
"state": state,
"redirect_uri": RUNKEEPER_REDIRECT_URI}
url = "https://runkeeper.com/apps/authorize?"+ urllib.urlencode(params)
url = "https://runkeeper.com/apps/authorize?"+ urllib.parse.urlencode(params)
return HttpResponseRedirect(url)
@@ -477,7 +477,7 @@ def rower_sporttracks_authorize(request):
"state": state,
"redirect_uri": SPORTTRACKS_REDIRECT_URI}
url = "https://api.sporttracks.mobi/oauth2/authorize?"+ urllib.urlencode(params)
url = "https://api.sporttracks.mobi/oauth2/authorize?"+ urllib.parse.urlencode(params)
return HttpResponseRedirect(url)
@@ -511,7 +511,7 @@ def rower_tp_authorize(request):
"redirect_uri": TP_REDIRECT_URI,
"scope": "file:write",
}
url = "https://oauth.trainingpeaks.com/oauth/authorize/?" +urllib.urlencode(params)
url = "https://oauth.trainingpeaks.com/oauth/authorize/?" +urllib.parse.urlencode(params)
return HttpResponseRedirect(url)