Mercurial > public > sg101
diff accounts/views.py @ 679:89b240fe9297
For Django 1.5.2: import json; django.utils.simplejson is deprecated.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 15 Aug 2013 20:14:33 -0500 |
parents | 8e6b8ffe5f34 |
children | 988782c6ce6c |
line wrap: on
line diff
--- a/accounts/views.py Wed Aug 14 14:53:21 2013 -0500 +++ b/accounts/views.py Thu Aug 15 20:14:33 2013 -0500 @@ -3,6 +3,7 @@ """ import datetime +import json import logging from django.shortcuts import render @@ -13,7 +14,6 @@ from django.conf import settings from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth import login -from django.utils import simplejson from accounts.models import PendingUser from accounts.forms import RegisterForm, ForgotUsernameForm @@ -105,8 +105,7 @@ else: response['error'] = 'Invalid username or password' - return HttpResponse(simplejson.dumps(response), - content_type='application/json') + return HttpResponse(json.dumps(response), content_type='application/json') #######################################################################