equal
deleted
inserted
replaced
364 class EntityView(View): |
364 class EntityView(View): |
365 """base class for views applying on an entity (i.e. uniform result set)""" |
365 """base class for views applying on an entity (i.e. uniform result set)""" |
366 __select__ = non_final_entity() |
366 __select__ = non_final_entity() |
367 category = 'entityview' |
367 category = 'entityview' |
368 |
368 |
|
369 def call(self, **kwargs): |
|
370 if self.cw_rset is None: |
|
371 self.entity_call(self.cw_extra_kwargs.pop('entity')) |
|
372 else: |
|
373 super(EntityView, self).call(**kwargs) |
|
374 |
|
375 def cell_call(self, row, col, **kwargs): |
|
376 self.entity_call(self.cw_rset.get_entity(row, col), **kwargs) |
|
377 |
|
378 def entity_call(self, entity, **kwargs): |
|
379 raise NotImplementedError() |
369 |
380 |
370 class StartupView(View): |
381 class StartupView(View): |
371 """base class for views which doesn't need a particular result set to be |
382 """base class for views which doesn't need a particular result set to be |
372 displayed (so they can always be displayed !) |
383 displayed (so they can always be displayed !) |
373 """ |
384 """ |