cubicweb.pyramid
¶
Pyramid interface to CubicWeb
-
cubicweb.pyramid.
wsgi_application_from_cwconfig
(cwconfig, profile=False, profile_output=None, profile_dump_every=None, debugtoolbar=False)[source]¶ Build a WSGI application from a cubicweb configuration
Parameters: Returns: A fully operationnal WSGI application
-
cubicweb.pyramid.
wsgi_application
(instance_name=None, debug=None)[source]¶ Build a WSGI application from a cubicweb instance name
Parameters: - instance_name – Name of the cubicweb instance (optional). If not
provided,
CW_INSTANCE
must exists. - debug – Enable/disable the debug mode. If defined to True or False,
overrides
CW_DEBUG
.
The following environment variables are used if they exist:
-
CW_INSTANCE
¶ A CubicWeb instance name.
-
CW_DEBUG
¶ If defined, the debugmode is enabled.
The function can be used as an entry-point for third-party wsgi containers. Below is a sample uswgi configuration file:
[uwsgi] http = 127.0.1.1:8080 env = CW_INSTANCE=myinstance env = CW_DEBUG=1 module = cubicweb.pyramid:wsgi_application() virtualenv = /home/user/.virtualenvs/myvirtualenv processes = 1 threads = 8 stats = 127.0.0.1:9191 plugins = http,python
- instance_name – Name of the cubicweb instance (optional). If not
provided,