Backward compatibility layer for CubicWeb to run as a Pyramid application.


Set up a tween app that will handle the request if the main application raises a HTTPNotFound exception.

This is to keep legacy compatibility for cubes that makes use of the cubicweb urlresolvers.

It provides, for now, support for cubicweb controllers, but this feature will be reimplemented separatly in a less compatible way.

It is automatically included by the configuration system, but can be disabled in the Pyramid Settings file:

cubicweb.bwcompat = no
class cubicweb.pyramid.bwcompat.PyramidSessionHandler(appli)[source]#

A CW Session handler that rely on the pyramid API to fetch the needed informations.

It implements the cubicweb.web.application.CookieSessionHandler API.

class cubicweb.pyramid.bwcompat.CubicWebPyramidHandler(appli, cubicweb_config)[source]#

A Pyramid request handler that rely on a cubicweb instance to do the whole job


appli – A CubicWeb ‘Application’ object.


Handler that mimics what CubicWebPublisher.main_handle_request and CubicWebPublisher.core_handle do

class cubicweb.pyramid.bwcompat.TweenHandler(handler, registry)[source]#

A Pyramid tween handler that submit unhandled requests to a Cubicweb handler.

The CubicWeb handler to use is expected to be in the pyramid registry, at key 'cubicweb.handler'.