diff options
author | Dan McGee <dan@archlinux.org> | 2012-05-12 16:32:30 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-05-12 16:32:30 +0200 |
commit | a5f5557493446bede78adb0584c88208234f874e (patch) | |
tree | 6225bf10e655410c49aaf464f8e22d2d5fc35267 /todolists | |
parent | f36d876aca5571f09032d0d2a67c8b1f1a3258c8 (diff) | |
download | archweb-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 'todolists')
-rw-r--r-- | todolists/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/todolists/views.py b/todolists/views.py index 70209b6..b9ba090 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -1,5 +1,6 @@ -from django import forms +import json +from django import forms from django.http import HttpResponse from django.core.mail import send_mail from django.shortcuts import get_list_or_404, get_object_or_404, redirect @@ -9,7 +10,6 @@ from django.views.decorators.cache import never_cache from django.views.generic import DeleteView from django.views.generic.simple import direct_to_template from django.template import Context, loader -from django.utils import simplejson from main.models import Todolist, TodolistPkg, Package, Repo from packages.utils import attach_maintainers @@ -42,7 +42,7 @@ def flag(request, list_id, pkg_id): pkg.save() if request.is_ajax(): return HttpResponse( - simplejson.dumps({'complete': pkg.complete}), + json.dumps({'complete': pkg.complete}), mimetype='application/json') return redirect(todolist) |