[Cubicweb] Integrating CubicWeb views into Pyramid (long)

Christophe de Vienne christophe at unlish.com
Wed Aug 6 11:25:09 CEST 2014

Le 06/08/2014 10:56, Nicolas Chauvat a écrit :
> On Wed, Aug 06, 2014 at 12:51:48AM +0200, Christophe de Vienne wrote:
>> For point 2), I am not aware of examples were the weight variation
>> is actually important in the selection process.
> As you may have seen, in the current system, the weight is computed
> and returned by the predicate at evaluation time.
> If I understood correctly what you suggest, the weight would have to
> be an attribute of the predicate that could be used at
> startup/registration time to order the objects in the registry.


> I am not saying the current system has to be kept that way, it is good
> to discuss and re-evaluate all design decisions from time to time. I
> am just pointing things out in order to help the discussion make
> progress.
> Search for "return score" in cubicweb/predicates.py to get examples of
> predicates that will return different weights depending on the
> context.
> http://hg.logilab.org/master/cubicweb/file/tip/predicates.py

Thanks for the pointers.

I am pretty sure we will not drop the current system to the one I 
suggest in a near future.

But if we know that this new approach would make things easier, we can 
start thinking about it and, with time, decide whether or not we really 
need the current one.


More information about the Cubicweb mailing list