pyramid_cubicweb.bwcompat

pyramid_cubicweb.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:

cubicweb.bwcompat = no
class pyramid_cubicweb.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 pyramid_cubicweb.bwcompat.CubicWebPyramidHandler(appli)[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 pyramid_cubicweb.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'.