equal
deleted
inserted
replaced
161 req.form.update(kwargs) |
161 req.form.update(kwargs) |
162 return None, None |
162 return None, None |
163 return do_build_rset |
163 return do_build_rset |
164 |
164 |
165 def rgx_action(rql=None, args=None, cachekey=None, argsgroups=(), setuser=False, |
165 def rgx_action(rql=None, args=None, cachekey=None, argsgroups=(), setuser=False, |
166 form=None, formgroups=(), transforms={}, controller=None): |
166 form=None, formgroups=(), transforms={}, rqlformparams=(), controller=None): |
167 def do_build_rset(inputurl, uri, req, schema, |
167 def do_build_rset(inputurl, uri, req, schema, |
168 cachekey=cachekey # necessary to avoid UnboundLocalError |
168 cachekey=cachekey # necessary to avoid UnboundLocalError |
169 ): |
169 ): |
170 if rql: |
170 if rql: |
171 kwargs = args and args.copy() or {} |
171 kwargs = args and args.copy() or {} |
181 kwargs[key] = value |
181 kwargs[key] = value |
182 if cachekey is not None and key in cachekey: |
182 if cachekey is not None and key in cachekey: |
183 kwargs[key] = typed_eid(value) |
183 kwargs[key] = typed_eid(value) |
184 if setuser: |
184 if setuser: |
185 kwargs['u'] = req.user.eid |
185 kwargs['u'] = req.user.eid |
|
186 for param in rqlformparams: |
|
187 kwargs.setdefault(param, req.form.get(param)) |
186 rset = req.execute(rql, kwargs, cachekey) |
188 rset = req.execute(rql, kwargs, cachekey) |
187 else: |
189 else: |
188 rset = None |
190 rset = None |
189 form2 = form and form.copy() or {} |
191 form2 = form and form.copy() or {} |
190 if formgroups: |
192 if formgroups: |