summaryrefslogtreecommitdiffstats
path: root/mirrors
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-05-12 16:32:30 +0200
committerDan McGee <dan@archlinux.org>2012-05-12 16:32:30 +0200
commita5f5557493446bede78adb0584c88208234f874e (patch)
tree6225bf10e655410c49aaf464f8e22d2d5fc35267 /mirrors
parentf36d876aca5571f09032d0d2a67c8b1f1a3258c8 (diff)
downloadarchweb-a5f5557493446bede78adb0584c88208234f874e.tar.gz
archweb-a5f5557493446bede78adb0584c88208234f874e.tar.xz
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 'mirrors')
-rw-r--r--mirrors/views.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/mirrors/views.py b/mirrors/views.py
index eac78ff..b0be623 100644
--- a/mirrors/views.py
+++ b/mirrors/views.py
@@ -1,5 +1,6 @@
from datetime import timedelta
from itertools import groupby
+import json
from operator import attrgetter, itemgetter
from django import forms
@@ -10,7 +11,6 @@ from django.http import Http404, HttpResponse
from django.shortcuts import get_object_or_404
from django.views.decorators.csrf import csrf_exempt
from django.views.generic.simple import direct_to_template
-from django.utils import simplejson
from django_countries.countries import COUNTRIES
from .models import Mirror, MirrorUrl, MirrorProtocol
@@ -237,8 +237,7 @@ def status_json(request):
status_info = get_mirror_statuses()
data = status_info.copy()
data['version'] = 3
- to_json = simplejson.dumps(data, ensure_ascii=False,
- cls=MirrorStatusJSONEncoder)
+ to_json = json.dumps(data, ensure_ascii=False, cls=MirrorStatusJSONEncoder)
response = HttpResponse(to_json, mimetype='application/json')
return response