equal
deleted
inserted
replaced
162 |
162 |
163 XXX add and example of a single view w/ big "if" inside splitted into two views |
163 XXX add and example of a single view w/ big "if" inside splitted into two views |
164 with appropriate selectors. |
164 with appropriate selectors. |
165 |
165 |
166 |
166 |
|
167 .. CustomSelectors_ |
|
168 |
167 Defining your own selectors |
169 Defining your own selectors |
168 ``````````````````````````` |
170 ``````````````````````````` |
169 XXX objectify_selector, EntitySelector, EClassSelector... |
171 XXX objectify_selector, EntitySelector, EClassSelector... |
170 |
172 |
171 |
173 |
190 |
192 |
191 This will yield additional WARNINGs in the logs, like this:: |
193 This will yield additional WARNINGs in the logs, like this:: |
192 |
194 |
193 2009-01-09 16:43:52 - (cubicweb.selectors) WARNING: selector one_line_rset returned 0 for <class 'cubicweb.web.views.basecomponents.WFHistoryVComponent'> |
195 2009-01-09 16:43:52 - (cubicweb.selectors) WARNING: selector one_line_rset returned 0 for <class 'cubicweb.web.views.basecomponents.WFHistoryVComponent'> |
194 |
196 |
195 |
|
196 |
|
197 Take care not filtering-out messages whose log level is <= LOG_WARNING! |
197 Take care not filtering-out messages whose log level is <= LOG_WARNING! |
|
198 |
|
199 You can also give to traced_selection the registry ids of objects on which to debug |
|
200 you want to debug selection ('wfhistory' in the example above). |
|
201 |
|
202 Also, if you're using python 2.4, which as no 'with' yet, you'll have to to it |
|
203 the following way: |
|
204 |
|
205 .. sourcecode:: python |
|
206 |
|
207 from cubicweb import selectors |
|
208 selectors.TRACED_OIDS = ('wfhistory',) |
|
209 mycomp = self._cw.vreg['views'].select('wfhistory', self._cw, rset=rset) |
|
210 selectors.TRACED_OIDS = () |