I'm going to take a step back on this one. I've had a couple of
private email conversations where this has come up, and I've been
meaning to make a blog post about it. I'll bring it up for
conversation here, though, since Lee has opened the topic.

Particularly with positional parameters, CherryPy makes it easy to
construct useful, descriptive URLs. You just instantiate the object
that's going to respond to some URLs and drop it in the part of the
hierarchy you want. Just like that, It starts answer requests. No
separate configuration needed... everything is just assembled as a
Python program.

I have considered Routes integration for a use case that is not
handled quite as directly by CherryPy: providing compatibility with an
existing set of URLs. I think there would be value in using Routes to
take a look at an incoming URL, match it against one of these mapped
routes that exist for compatibility and point it to a place in your
controller hierarchy that should answer the request. With that use
case in mind, that would imply different things about the
implementation.

I'd be interested in hearing of other use cases (if there are any)
where CherryPy doesn't handle the task well.

(BTW, I should note that I'm specifically talking about where Routes
might have a place as part of TurboGears. I have no issue with someone
posting a recipe for something they're trying out.)

Kevin

On 12/12/05, Lee McFadden <[EMAIL PROTECTED]> wrote:
>
> Ok, I'm kinda stuck here.
>
> The method I posted on the Wiki skips the @turbogears.expose for each
> function (which is actually what I should expect, had I really read
> things properly) as the root function is being mutated into the
> function we actually want.
>
> Is there a way of accessing a function's decorator from another
> function?  I've been searching and can't find a way of doing it.
> Since it's there in the code, plain as day, there must be a way of
> getting the attributes assigned to the original decorator and 'self
> decorating' the new function?
>
> Thanks,
>
> Lee
>


--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Reply via email to