Mercurial > public > sg101
diff antispam/decorators.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 | ee87ea74d46b |
children | 988782c6ce6c |
line wrap: on
line diff
--- a/antispam/decorators.py Wed Aug 14 14:53:21 2013 -0500 +++ b/antispam/decorators.py Thu Aug 15 20:14:33 2013 -0500 @@ -3,10 +3,10 @@ """ from datetime import timedelta +import json from functools import wraps from django.shortcuts import render -from django.utils import simplejson from antispam.rate_limit import RateLimiter, RateLimiterUnavailable @@ -41,7 +41,7 @@ success = (response and response.has_header('location') and response.status_code == 302) elif response: - json_resp = simplejson.loads(response.content) + json_resp = json.loads(response.content) success = json_resp['success'] if not success: