web/request.py
changeset 5940 0e3ae19b181a
parent 5890 141b935a38fc
child 6062 f1a550102f5c
--- a/web/request.py	Thu Jul 08 12:54:28 2010 +0200
+++ b/web/request.py	Thu Jul 08 13:33:40 2010 +0200
@@ -37,14 +37,12 @@
 from cubicweb.dbapi import DBAPIRequest
 from cubicweb.mail import header
 from cubicweb.uilib import remove_html_tags
-from cubicweb.utils import SizeConstrainedList, HTMLHead, make_uid
+from cubicweb.utils import SizeConstrainedList, HTMLHead, make_uid, json_dumps
 from cubicweb.view import STRICT_DOCTYPE, TRANSITIONAL_DOCTYPE_NOEXT
 from cubicweb.web import (INTERNAL_FIELD_VALUE, LOGGER, NothingToEdit,
-                          RequestError, StatusResponse, json)
+                          RequestError, StatusResponse)
 from cubicweb.web.http_headers import Headers
 
-dumps = json.dumps
-
 _MARKER = object()
 
 
@@ -358,7 +356,7 @@
         """
         self.add_js('cubicweb.ajax.js')
         cbname = self.register_onetime_callback(cb, *args)
-        msg = dumps(msg or '')
+        msg = json_dumps(msg or '')
         return "javascript:userCallbackThenReloadPage('%s', %s)" % (
             cbname, msg)
 
@@ -592,7 +590,7 @@
         extraparams.setdefault('fname', 'view')
         url = self.build_url('json', **extraparams)
         return "javascript: $('#%s').loadxhtml(%s, null, 'get', '%s'); noop()" % (
-                nodeid, dumps(url), replacemode)
+                nodeid, json_dumps(url), replacemode)
 
     # urls/path management ####################################################