diff --git a/api.py b/api.py index 9cb3e10..02b9130 100644 --- a/api.py +++ b/api.py @@ -14,7 +14,7 @@ """ from google.appengine.api import memcache from google.appengine.api import urlfetch -from django.utils import simplejson +from json DEADLINE = 7 @@ -24,7 +24,7 @@ def _request(url, cache_ttl=3600, force=False): resp = memcache.get(request_cache_key) if force or not resp: try: - resp = simplejson.loads(urlfetch.fetch(url, deadline=DEADLINE).content) + resp = json.loads(urlfetch.fetch(url, deadline=DEADLINE).content) memcache.set(request_cache_key, resp, cache_ttl) memcache.set(failure_cache_key, resp, cache_ttl*10) except (ValueError, urlfetch.DownloadError), e: @@ -37,4 +37,4 @@ def _request(url, cache_ttl=3600, force=False): def domain(path, force=False): base_url = 'http://domain.hackerdojo.com' - return _request(base_url + path, force=force) \ No newline at end of file + return _request(base_url + path, force=force)