equal
deleted
inserted
replaced
192 |
192 |
193 def possible_objects(self, *args, **kwargs): |
193 def possible_objects(self, *args, **kwargs): |
194 """return an iterator on possible objects in this registry for the given |
194 """return an iterator on possible objects in this registry for the given |
195 context |
195 context |
196 """ |
196 """ |
197 from cubicweb.selectors import traced_selection |
197 from logilab.common.registry import traced_selection |
198 with traced_selection(): |
198 with traced_selection(): |
199 for appobjects in self.itervalues(): |
199 for appobjects in self.itervalues(): |
200 try: |
200 try: |
201 yield self._select_best(appobjects, *args, **kwargs) |
201 yield self._select_best(appobjects, *args, **kwargs) |
202 except NoSelectableObject: |
202 except NoSelectableObject: |
215 .. sourcecode:: python |
215 .. sourcecode:: python |
216 |
216 |
217 def _select_view_and_rset(self, rset): |
217 def _select_view_and_rset(self, rset): |
218 ... |
218 ... |
219 try: |
219 try: |
220 from cubicweb.selectors import traced_selection |
220 from logilab.common.registry import traced_selection |
221 with traced_selection(): |
221 with traced_selection(): |
222 view = self._cw.vreg['views'].select(vid, req, rset=rset) |
222 view = self._cw.vreg['views'].select(vid, req, rset=rset) |
223 except ObjectNotFound: |
223 except ObjectNotFound: |
224 self.warning("the view %s could not be found", vid) |
224 self.warning("the view %s could not be found", vid) |
225 req.set_message(req._("The view %s could not be found") % vid) |
225 req.set_message(req._("The view %s could not be found") % vid) |