cubicweb/skeleton/cubicweb_CUBENAME/__init__.py.tmpl
changeset 11945 ef6b18c56b5a
parent 11454 7770559e3945
child 11968 bb0dfc7d2d0e
--- a/cubicweb/skeleton/cubicweb_CUBENAME/__init__.py.tmpl	Fri Jan 27 09:58:30 2017 +0100
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/__init__.py.tmpl	Fri Jan 27 11:05:07 2017 +0100
@@ -2,3 +2,12 @@
 
 %(longdesc)s
 """
+
+
+def pyramid_main(global_config, **settings):
+    """Return a Pyramid WSGI application bound to a CubicWeb repository."""
+    from pyramid.config import Configurator
+    config = Configurator(settings=settings)
+    config.include('cubicweb.pyramid')
+    config.scan()
+    return config.make_wsgi_app()