[Cubicweb] Selecting multiple views [Was: Integrating CubicWeb views into Pyramid (long)]

Christophe de Vienne christophe at unlish.com
Tue Aug 26 17:35:36 CEST 2014


Le 26/08/2014 17:07, Sylvain Thénault a écrit :
> On 06 août 12:29, Christophe de Vienne wrote:
>> Le 06/08/2014 12:19, Nicolas Chauvat a écrit :
>>> On Wed, Aug 06, 2014 at 11:39:38AM +0200, Christophe de Vienne wrote:
>>>> and the goal is always to select one view (and again, I talk only
>>>> for the views, not the other appobjects).
>>> Except maybe when the user interface is trying to display the list of
>>> views that could be applied to the current resulset.
>>>
>>> An example would be the "possible views" side box and its method
>>> init_rendering at
>>> http://hg.logilab.org/master/cubicweb/file/aee99876eb10/web/views/boxes.py#l167
>> Indeed, except in this case it is not views that are selected, but
>> view names.
> The main point is that cw's registry have different API for those different
> purpose:
>
> * select the best view (given a regid)
> * get all possible views (the best for every possible regid)

It should be possible to provide such an API on top of the pyramid 
registry. I do not have (yet) a clear view on the best approach to do 
that though.


Christophe



More information about the Cubicweb mailing list