KS Chan  committed 967b2e5

Mounted RouteDispatcher of UserController

  • Participants
  • Parent commits 061c6c3
  • Branches default

Comments (0)

Files changed (1)

File src/pythonhk/

 import pythonhk
 from pythonhk.cp.plugins import *
-from pythonhk.controllers import Root as WebRoot
+from pythonhk.controllers import (Root as WebRoot, UserController as UserRoot, user_routes)
 from pythonhk.rest_api import api_routes, error_handlers
                       "tools.orm_session.on": True,
                       "tools.sessions.on": True,
                       "tools.sessions.storage_type": "redis"}}
+    user_conf = {"/": {"request.dispatch": user_routes,
+                      "tools.proxy.on": True,
+                      "tools.orm_session.on": True,
+                      "tools.sessions.on": True,
+                      "tools.sessions.storage_type": "redis"}}
     cherrypy.tree.mount(None, script_name="/api", config=api_conf)
     cherrypy.tree.mount(None, script_name="/api/v1", config=api_conf)
+    cherrypy.tree.mount(None, script_name="/user", config=user_conf)
     # Always start the cpengine; this will start all other services