diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2014-06-02 20:59:28 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2014-06-02 20:59:28 +0300 |
commit | e49b7e02b2150413d2e78db709277fae0887be46 (patch) | |
tree | 6c39946f2b4aca080c75274f97ec263f793ae012 /mediagoblin/auth | |
parent | a80c74bbcc6ac0208cfef725a441810a29876cff (diff) | |
download | mediagoblin-e49b7e02b2150413d2e78db709277fae0887be46.tar.lz mediagoblin-e49b7e02b2150413d2e78db709277fae0887be46.tar.xz mediagoblin-e49b7e02b2150413d2e78db709277fae0887be46.zip |
Use six.text_type instead of unicode().
I will be switch to use ``from __future__ import unicode_literals`` later.
Diffstat (limited to 'mediagoblin/auth')
-rw-r--r-- | mediagoblin/auth/tools.py | 4 | ||||
-rw-r--r-- | mediagoblin/auth/views.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/mediagoblin/auth/tools.py b/mediagoblin/auth/tools.py index 88716e1c..8c919498 100644 --- a/mediagoblin/auth/tools.py +++ b/mediagoblin/auth/tools.py @@ -16,6 +16,8 @@ import logging + +import six import wtforms from sqlalchemy import or_ @@ -140,7 +142,7 @@ def register_user(request, register_form): user.save() # log the user in - request.session['user_id'] = unicode(user.id) + request.session['user_id'] = six.text_type(user.id) request.session.save() # send verification email diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index 3d132f84..a90db0ea 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -14,6 +14,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +import six + from itsdangerous import BadSignature from mediagoblin import messages, mg_globals @@ -93,7 +95,7 @@ def login(request): # set up login in session if login_form.stay_logged_in.data: request.session['stay_logged_in'] = True - request.session['user_id'] = unicode(user.id) + request.session['user_id'] = six.text_type(user.id) request.session.save() if request.form.get('next'): |