web/views/basecontrollers.py
branchstable
changeset 2255 c346af0727ca
parent 2240 ff84892900ac
child 2293 7ded2a1416e4
child 2312 af4d8f75c5db
--- a/web/views/basecontrollers.py	Fri Jul 03 16:50:13 2009 +0200
+++ b/web/views/basecontrollers.py	Fri Jul 03 17:57:19 2009 +0200
@@ -196,7 +196,7 @@
     except NoSelectableObject:
         return (False, {None: req._('not authorized')})
     try:
-        ctrl.publish(None, fromjson=True)
+        ctrl.publish(None)
     except ValidationError, ex:
         req.cnx.rollback()
         return (False, _validation_error(req, ex))
@@ -219,6 +219,7 @@
     id = 'validateform'
 
     def publish(self, rset=None):
+        self.req.json_request = True
         # XXX unclear why we have a separated controller here vs
         # js_validate_form on the json controller
         status, args = _validate_form(self.req, self.vreg)
@@ -243,6 +244,7 @@
         note: it's the responsability of js_* methods to set the correct
         response content type
         """
+        self.req.json_request = True
         self.req.pageid = self.req.form.get('pageid')
         try:
             fname = self.req.form['fname']