cubicweb_web.bwcompat#

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

cubicweb_web.bwcompat.includeme(config)[source]#

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_web.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_web.bwcompat.CubicWebPyramidHandler(appli, cubicweb_config)[source]#

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

Parameters

appli – A CubicWeb ‘Application’ object.

__call__(request)[source]#

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

class cubicweb_web.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'.