pyramid_cubicweb
¶
-
pyramid_cubicweb.
make_cubicweb_application
(cwconfig, settings=None)[source]¶ Create a pyramid-based CubicWeb instance from a cubicweb configuration.
It is initialy meant to be used by the ‘pyramid’ command of cubicweb-ctl.
Parameters: cwconfig – A CubicWeb configuration Returns: A Pyramid config object
-
pyramid_cubicweb.
wsgi_application_from_cwconfig
(cwconfig, profile=False, profile_output=None, profile_dump_every=None)[source]¶ Build a WSGI application from a cubicweb configuration
Parameters: Returns: A fully operationnal WSGI application
-
pyramid_cubicweb.
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 = pyramid_cubicweb: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,