Changeset 3597 in products for quintagroup.analytics/trunk/quintagroup/analytics/browser/views.py
- Timestamp:
- Oct 24, 2012 1:27:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.analytics/trunk/quintagroup/analytics/browser/views.py
r3466 r3597 112 112 data.append(self.getContent(type_)) 113 113 other = [self.getContent(t) for t in self.getTypes( 114 114 all=True)[self.MAX:]] 115 115 if other: 116 116 data.append([sum(l) for l in zip(*other)]) … … 334 334 info['left_slots'] = obj.getProperty('left_slots') 335 335 self.expressions = self.expressions.union( 336 336 set(info['left_slots'])) 337 337 if obj.hasProperty('right_slots'): 338 338 info['right_slots'] = obj.getProperty('right_slots') 339 339 self.expressions = self.expressions.union( 340 340 set(info['right_slots'])) 341 341 return info 342 342 343 343 def _walk(self, obj, level=-1): 344 344 yield self._getInfo(obj) 345 if level != 0 and (IFolderish.providedBy(obj) \346 or IBaseFolder.providedBy(obj)):345 if level != 0 and (IFolderish.providedBy(obj) 346 or IBaseFolder.providedBy(obj)): 347 347 for v in obj.contentValues(): 348 348 for i in self._walk(v, level - 1): … … 358 358 for i in self._walk(self.context, level): 359 359 if self.DEBUG or i['left_slots'] is not None \ 360 360 or i['right_slots'] is not None: 361 361 infos.append(i) 362 362 self.total = len(infos) … … 401 401 obj = aq_base(obj) 402 402 self.proplist.extend( 403 403 [i for i in obj.propertyIds() if i not in self.proplist]) 404 404 if obj.hasProperty(self.propname): 405 405 info['slots'] = obj.getProperty(self.propname) … … 408 408 if not isinstance(info['slots'], basestring): 409 409 self.expressions = self.expressions.union( 410 410 set(info['slots'])) 411 411 else: 412 412 self.expressions = self.expressions.union( 413 413 set([info['slots']])) 414 414 return info 415 415 416 416 def _walk(self, obj, level=-1): 417 417 yield self._getInfo(obj) 418 if level != 0 and (IFolderish.providedBy(obj) \419 or IBaseFolder.providedBy(obj)):418 if level != 0 and (IFolderish.providedBy(obj) 419 or IBaseFolder.providedBy(obj)): 420 420 for v in obj.contentValues(): 421 421 for i in self._walk(v, level - 1): … … 516 516 'editview': editviewName, 517 517 'visible': settings.get('visible', True), 518 518 }) 519 519 return data 520 520 … … 553 553 except: 554 554 pass 555 if level != 0 and (IFolderish.providedBy(obj) \556 or IBaseFolder.providedBy(obj)):555 if level != 0 and (IFolderish.providedBy(obj) 556 or IBaseFolder.providedBy(obj)): 557 557 for v in obj.contentValues(): 558 558 for i in self._walk(v, level - 1): … … 568 568 for i in self._walk(self.context, level): 569 569 if self.DEBUG or i['left_slots'] is not None \ 570 570 or i['right_slots'] is not None: 571 571 infos.append(i) 572 572 self.total = len(infos)
Note: See TracChangeset
for help on using the changeset viewer.