From 23c3ff70b51916de663efffb01a93e6a27860a99 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Thu, 22 Dec 2016 08:29:02 +0100 Subject: [PATCH] still not working --- rowers/c2stuff.py | 3 ++- rowers/views.py | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/rowers/c2stuff.py b/rowers/c2stuff.py index 1ba4c03d..2e499499 100644 --- a/rowers/c2stuff.py +++ b/rowers/c2stuff.py @@ -311,9 +311,10 @@ def make_authorization_url(request): params = {"client_id": CLIENT_ID, "response_type": "code", - "scope":scope, "redirect_uri": REDIRECT_URI} url = "https://log.concept2.com/oauth/authorize?"+ urllib.urlencode(params) + url += "&scope="+scope + print url # url = "https://ssl.reddit.com/api/v1/authorize?" + urllib.urlencode(params) return HttpResponseRedirect(url) diff --git a/rowers/views.py b/rowers/views.py index 3a57a324..9dc901ce 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -1096,14 +1096,12 @@ def rower_c2_authorize(request): from uuid import uuid4 state = str(uuid4()) scope = "user:read,results:write" - params = {"client_id": C2_CLIENT_ID, "response_type": "code", - "scope":scope, "redirect_uri": C2_REDIRECT_URI} import urllib url = "http://log.concept2.com/oauth/authorize?"+ urllib.urlencode(params) - + url += "&scope="+scope return HttpResponseRedirect(url) @login_required()