summaryrefslogtreecommitdiff
path: root/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl')
-rw-r--r--paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl24
1 files changed, 24 insertions, 0 deletions
diff --git a/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl b/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl
new file mode 100644
index 0000000..97decb8
--- /dev/null
+++ b/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl
@@ -0,0 +1,24 @@
+from paste.deploy.config import ConfigMiddleware
+
+import sampleapp
+
+
+def make_app(
+ global_conf,
+ # Optional and required configuration parameters
+ # can go here, or just **kw; greeting is required:
+ greeting,
+ **kw):
+ # This is a WSGI application:
+ app = sampleapp.application
+ # Here we merge all the keys into one configuration
+ # dictionary; you don't have to do this, but this
+ # can be convenient later to add ad hoc configuration:
+ conf = global_conf.copy()
+ conf.update(kw)
+ conf['greeting'] = greeting
+ # ConfigMiddleware means that paste.deploy.CONFIG will,
+ # during this request (threadsafe) represent the
+ # configuration dictionary we set up:
+ app = ConfigMiddleware(app, conf)
+ return app