diff phantombrigade/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 10f3acc18b2d
children
line wrap: on
line diff
--- a/phantombrigade/views.py	Wed Aug 14 14:53:21 2013 -0500
+++ b/phantombrigade/views.py	Thu Aug 15 20:14:33 2013 -0500
@@ -9,10 +9,11 @@
 Current we provide a TeamSpeak 3 status view for the PhantomBrigade.us website.
 
 """
+import json
+
 from django.conf import settings
 from django.core.cache import cache
 from django.http import HttpResponse, HttpResponseServerError
-from django.utils import simplejson
 import ts3
 
 
@@ -94,8 +95,8 @@
             channel['children'].append(node)
 
     tree = [channels[0]]
-    json = simplejson.dumps(tree)
+    status = json.dumps(tree)
 
-    cache.set(CACHE_KEY, json, CACHE_TIMEOUT)
+    cache.set(CACHE_KEY, status, CACHE_TIMEOUT)
 
-    return HttpResponse(json, content_type='application/json')
+    return HttpResponse(status, content_type='application/json')