web/request.py
changeset 8128 0a927fe4541b
parent 8082 1c37783ff610
child 8155 c075950cc929
--- a/web/request.py	Fri Dec 09 12:14:11 2011 +0100
+++ b/web/request.py	Fri Dec 16 12:30:12 2011 +0100
@@ -82,7 +82,7 @@
 
 class CubicWebRequestBase(DBAPIRequest):
     """abstract HTTP request, should be extended according to the HTTP backend"""
-    json_request = False # to be set to True by json controllers
+    ajax_request = False # to be set to True by ajax controllers
 
     def __init__(self, vreg, https, form=None):
         super(CubicWebRequestBase, self).__init__(vreg)
@@ -122,6 +122,12 @@
         self.pageid = pid
 
     @property
+    def json_request(self):
+        warn('[3.15] self._cw.json_request is deprecated, use self._cw.ajax_request instead',
+             DeprecationWarning, stacklevel=2)
+        return self.ajax_request
+
+    @property
     def authmode(self):
         return self.vreg.config['auth-mode']