From a5f5557493446bede78adb0584c88208234f874e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 12 May 2012 09:32:30 -0500 Subject: 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 --- todolists/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'todolists') 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) -- cgit v1.2.3-24-g4f1b