summaryrefslogtreecommitdiff
path: root/visualize/views.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-05-12 09:32:30 -0500
committerDan McGee <dan@archlinux.org>2012-05-12 09:32:30 -0500
commita5f5557493446bede78adb0584c88208234f874e (patch)
tree6225bf10e655410c49aaf464f8e22d2d5fc35267 /visualize/views.py
parentf36d876aca5571f09032d0d2a67c8b1f1a3258c8 (diff)
Use python json module directly in place of simplejson
As of Python 2.6, this is a builtin module that has all the same functions and capabilities of the Django simplejson module. Additionally simplejson is deprecated in the upcoming Django 1.5 release. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'visualize/views.py')
-rw-r--r--visualize/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/visualize/views.py b/visualize/views.py
index afc5429d..95f8c314 100644
--- a/visualize/views.py
+++ b/visualize/views.py
@@ -1,9 +1,9 @@
from datetime import datetime
+import json
from django.contrib.auth.models import User
from django.db.models import Count, Sum, Q
from django.http import HttpResponse
-from django.utils import simplejson
from django.views.decorators.cache import cache_page
from django.views.generic.simple import direct_to_template
@@ -61,13 +61,13 @@ def arch_repo_data():
@cache_page(1800)
def by_arch(request):
data = arch_repo_data()
- to_json = simplejson.dumps(data['by_arch'], ensure_ascii=False)
+ to_json = json.dumps(data['by_arch'], ensure_ascii=False)
return HttpResponse(to_json, mimetype='application/json')
@cache_page(1800)
def by_repo(request):
data = arch_repo_data()
- to_json = simplejson.dumps(data['by_repo'], ensure_ascii=False)
+ to_json = json.dumps(data['by_repo'], ensure_ascii=False)
return HttpResponse(to_json, mimetype='application/json')
@@ -109,7 +109,7 @@ def pgp_keys(request):
data = { 'nodes': node_list, 'edges': edge_list }
- to_json = simplejson.dumps(data, ensure_ascii=False)
+ to_json = json.dumps(data, ensure_ascii=False)
return HttpResponse(to_json, mimetype='application/json')
# vim: set ts=4 sw=4 et: