aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/oauth/views.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2014-09-22 13:58:13 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-09-22 13:58:13 -0500
commita6252cbf211691aa9d81fd535f5af7bcdbbd6620 (patch)
treeca1131ba7a8ff0437d392c20a70f17ee7470e3dd /mediagoblin/plugins/oauth/views.py
parentc47f402d7ee42e88ee1086351010dd598da6c0a5 (diff)
parent6430ae97eca57f4db4bcef54436df6c2abcd21ad (diff)
downloadmediagoblin-a6252cbf211691aa9d81fd535f5af7bcdbbd6620.tar.lz
mediagoblin-a6252cbf211691aa9d81fd535f5af7bcdbbd6620.tar.xz
mediagoblin-a6252cbf211691aa9d81fd535f5af7bcdbbd6620.zip
Merge branch 'merge-python3-port'
Conflicts: setup.py
Diffstat (limited to 'mediagoblin/plugins/oauth/views.py')
-rw-r--r--mediagoblin/plugins/oauth/views.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/mediagoblin/plugins/oauth/views.py b/mediagoblin/plugins/oauth/views.py
index de637d6b..8ca73521 100644
--- a/mediagoblin/plugins/oauth/views.py
+++ b/mediagoblin/plugins/oauth/views.py
@@ -17,7 +17,9 @@
import logging
-from urllib import urlencode
+from six.moves.urllib.parse import urlencode
+
+import six
from werkzeug.exceptions import BadRequest
@@ -44,11 +46,11 @@ def register_client(request):
if request.method == 'POST' and form.validate():
client = OAuthClient()
- client.name = unicode(form.name.data)
- client.description = unicode(form.description.data)
- client.type = unicode(form.type.data)
+ client.name = six.text_type(form.name.data)
+ client.description = six.text_type(form.description.data)
+ client.type = six.text_type(form.type.data)
client.owner_id = request.user.id
- client.redirect_uri = unicode(form.redirect_uri.data)
+ client.redirect_uri = six.text_type(form.redirect_uri.data)
client.save()