Commits

Ginés Martínez Sánchez committed cb0aecb Draft

improve multi-wsgi

  • Participants
  • Parent commits 5cde52d

Comments (0)

Files changed (2)

ginsfsm/protocols/wsgi/common/urlmap.py

         extra += '\nPATH_INFO: %r' % environ.get('PATH_INFO')
         extra += '\nHTTP_HOST: %r' % environ.get('HTTP_HOST')
         # NotFound('The resource could not be found.')
+        # TODO: eliminate paste dependency
         from paste import httpexceptions
         app = httpexceptions.HTTPNotFound(
             environ['PATH_INFO'],

ginsfsm/scaffolds/multiple_wsgi/+package+/main.py_tmpl

         URLMap,
         parse_path_expression,
     )
-    local_conf = {
-        '/': application1,
-        '/app2': application2,
-        '/app3': application3,
+    route_apps = {
+        '/': paste_app_factory1({}),
+        '/app2': paste_app_factory2({}),
+        '/app3': paste_app_factory3({}),
     }
 
     urlmap = URLMap()
-    for path, app in local_conf.items():
+    for path, app in route_apps.items():
         path = parse_path_expression(path)
         urlmap[path] = app