From fced64727113b398754752daaf2adb20b58704bd Mon Sep 17 00:00:00 2001 From: Tony Zhu Date: Mon, 31 Mar 2014 14:43:59 -0400 Subject: [PATCH] Use json instead of deprecated django.utils.simplejson --- helpdesk/views/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpdesk/views/api.py b/helpdesk/views/api.py index 64e162e7..2b386d77 100644 --- a/helpdesk/views/api.py +++ b/helpdesk/views/api.py @@ -11,13 +11,13 @@ The API documentation can be accessed by visiting http://helpdesk/api/help/ through templates/helpdesk/help_api.html. """ +import json from django import forms from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.http import HttpResponse from django.shortcuts import render_to_response from django.template import loader, Context -from django.utils import simplejson from django.views.decorators.csrf import csrf_exempt try: @@ -116,7 +116,7 @@ class API: def api_public_list_queues(self): - return api_return(STATUS_OK, simplejson.dumps([{"id": "%s" % q.id, "title": "%s" % q.title} for q in Queue.objects.all()]), json=True) + return api_return(STATUS_OK, json.dumps([{"id": "%s" % q.id, "title": "%s" % q.title} for q in Queue.objects.all()]), json=True) def api_public_find_user(self):