[Cubicweb] Pyramid and REST

Rabah Meradi rabah.meradi at logilab.fr
Mon Jun 8 14:03:57 CEST 2015


On Wed, 2015-06-03 at 09:38 +0200, Christophe de Vienne wrote:
> I just had a quick look.
> 
> We need to define a standard route for entities, that match
> /etype/*traverse. The nature of the context has to be discussed, as we
> have different options to explore.
> This route would used by any view that work on the etypes or entities,
> including your 'delete' view.
> 
> I think this route should be defined in pyramid-cubicweb, so any cube
> can add views on it.

Is it possible to use pyramid traversal for this? I don't know if it's
possible otherwise, but to use all the power of the pyramid traversal we
must adapt our resources. In our case add the __getitem__ method to the
entity object. 

> Meanwhile, the routes you define automatically will do the work, but
> with a pretty high cost.

Can you explain why there will be a high cost?



More information about the Cubicweb mailing list