python - Dynamic URL with CherryPY MethodDispatcher -


I need to configure a fixed-style URL that supports the following URL scheme:

  • / parent / 1 / child
  • / parent / 1 / chidambar / 1
< / Li> P> I want to use MethodDispatcher to have GET / POST / PUT / DELETE functions in each of the above. I am working for it first and second, but I do not understand how to configure Dispatcher for children's part. I have a book, but it hardly involves it and I can not get any sample online.

Here I have a method discretion that is currently configured.

  root = root () Conf = {'/': {'request.dispatch': cherrypy.dispatch.MethodDispatcher ()}} cherrypy.quickstart (root, '/ parent', config = Conf)  

Any help would be appreciated.

Maybe you want what you want.

In Cherry P. 3.2 (just coming out of the beta just now), a new _cp_dispatch method you can use to do the same thing in your object tree or traversal Can also change, as something happens on the lines of Quixote's _q_lookup and _q_resolve


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -