These are chat archives for cherrypy/cherrypy

Nov 2018
Himanshu Jain
Nov 16 2018 00:58
Trying the routes dispatcher and the later routes are somehow overwriting the earlier routes. Any idea what I am doing wrong
from vds.controllers.root import Root
from vds.controllers.job import Job
from vds.controllers.cluster import Cluster
import cherrypy

routes = cherrypy.dispatch.RoutesDispatcher()

# add a job

routes.connect(None, "/vds/job", controller=Job, action='add_job', conditions=dict(method=["POST"]))
# find job by id

# get all cluster  info
routes.connect(None, "/vds/clusters", controller=Cluster, action='get_clusters', conditions=dict(method=["GET"]))
Himanshu Jain
Nov 16 2018 01:23
never mind, it was because of not assigning name to the routes, the 2nd controller was the only one that would show up in routes controller. Assigning the name solves the problem.
S Sathish Babu
Nov 16 2018 06:49
What are the security filters provided by cherrypy by default ?