On 5/25/07, Scott Chapman <scott_list mischko.com> wrote:
>
> I've been looking at RESTful dispatch tools for use
with CP and I'm not seeing
> any that will dispatch where you have multiple
parameters in the URL, like
> /Y/M/D in the following (consider that /M/D are
optional as well!):
>
> /posts/Y/M/D/user/ID
>
> Everything I'm seeing expects there to be only one
parameter. This would work
> for most of the cases but there will be exceptions.
Well, you can handle those URLs directly with CP using the
default method:
http://cherrypy.org/wiki/CherryPyTuto
rial#Partialmatchesandthedefaultmethod
If that isn't enough, you can used the provided Routes
dispatcher or
the HTTP MethodDispatcher.
htt
p://cherrypy.org/wiki/PageHandlers#Dispatchers
> There's a Selector module that works with WSGI
applications that will handle
> this just great but using it inside CP looks like you'd
have to write a
> straight WSGI application and lose functionality
provided by CP as a result
> (i.e. logging, etc.)
If you would like to use Selector, perhaps it could be
hooked up to
CherryPy as a custom dispatcher, like the one for Routes.
That would
be a welcome contribution to the collection of code at
tools.cherrypy.org.
> It appears from my limited look so far at WSGI that you
have to get modules to
> do everything (i.e. paste.translogger for logging) and
you end up gluing a
> bunch of stuff together that CP already supplies.
Yes, WSGI itself is really something that the application
developer
shouldn't have to deal with on a high level. It is useful
for
framework/tool authors though.
HTH,
Christian
http://www.dowski.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|