summaryrefslogtreecommitdiff
path: root/packages/views/signoff.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 /packages/views/signoff.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 'packages/views/signoff.py')
-rw-r--r--packages/views/signoff.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/views/signoff.py b/packages/views/signoff.py
index 63341a1d..61d949fc 100644
--- a/packages/views/signoff.py
+++ b/packages/views/signoff.py
@@ -1,3 +1,4 @@
+import json
from operator import attrgetter
from django import forms
@@ -7,7 +8,6 @@ from django.core.serializers.json import DjangoJSONEncoder
from django.db import transaction
from django.http import HttpResponse, Http404
from django.shortcuts import get_list_or_404, redirect, render
-from django.utils import simplejson
from django.views.decorators.cache import never_cache
from django.views.generic.simple import direct_to_template
@@ -67,7 +67,7 @@ def signoff_package(request, name, repo, arch, revoke=False):
'known_bad': spec.known_bad,
'user': str(request.user),
}
- return HttpResponse(simplejson.dumps(data, ensure_ascii=False),
+ return HttpResponse(json.dumps(data, ensure_ascii=False),
mimetype='application/json')
return redirect('package-signoffs')
@@ -183,8 +183,7 @@ def signoffs_json(request):
'version': 2,
'signoff_groups': signoff_groups,
}
- to_json = simplejson.dumps(data, ensure_ascii=False,
- cls=SignoffJSONEncoder)
+ to_json = json.dumps(data, ensure_ascii=False, cls=SignoffJSONEncoder)
response = HttpResponse(to_json, mimetype='application/json')
return response