web/views/basecontrollers.py
branchstable
changeset 6237 0c886f667b1f
parent 6207 c3f11fadf9ed
child 6238 2f5ebeb7665d
equal deleted inserted replaced
6236:9138f23ee263 6237:0c886f667b1f
   332             form['__action_%s' % action] = u'whatever'
   332             form['__action_%s' % action] = u'whatever'
   333         return form
   333         return form
   334 
   334 
   335     def _exec(self, rql, args=None, rocheck=True):
   335     def _exec(self, rql, args=None, rocheck=True):
   336         """json mode: execute RQL and return resultset as json"""
   336         """json mode: execute RQL and return resultset as json"""
       
   337         rql = rql.strip()
       
   338         if rql.startswith('rql:'):
       
   339             rql = rql[4:]
   337         if rocheck:
   340         if rocheck:
   338             self._cw.ensure_ro_rql(rql)
   341             self._cw.ensure_ro_rql(rql)
   339         try:
   342         try:
   340             return self._cw.execute(rql, args)
   343             return self._cw.execute(rql, args)
   341         except Exception, ex:
   344         except Exception, ex: