From 9b3e71e2ace4de074a30a54462a62f03ef2c93e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bisinger?= <stephane.bisinger@gmail.com> Date: Thu, 28 May 2015 12:32:52 +0200 Subject: [PATCH] Add instructions to configure cornice with WSME Add an example in the documentation to show how to configure pyramid to use the WSME extensions with cornice. Closes-Bug: #1316888 Change-Id: Id1ad7149260205809de0b7f8ded51d45a8390880 --- doc/integrate.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/integrate.rst b/doc/integrate.rst index 48144bc..e9dbadc 100644 --- a/doc/integrate.rst +++ b/doc/integrate.rst @@ -84,6 +84,23 @@ Cornice Declare the parameters of a function and returns a function suitable for cornice (ie that takes a request and returns a response). +Configuration +~~~~~~~~~~~~~ + +To use WSME with Cornice you have to add a configuration option to your Pyramid application. + +.. code-block:: python + + from pyramid.config import Configurator + + + def make_app(): + config = Configurator() + config.include("cornice") + config.include("wsmeext.cornice") # This includes WSME cornice support + # ... + return config.make_wsgi_app() + Example ~~~~~~~