Neil Blakey-Milner wrote:
> Okay, maybe I didn't explain myself well enough here.  @expose does at
> least two things:
>
> 1) Sets .exposed so that CherryPy can find it
> 2) Does template magic, including content type/accept format, and so
> forth.
>
> While named after #1, most of what it does is #2.  I also don't want #1
> (it causes the method in question to be handled by CherryPy instead of
> using Routes via the default method), but I do want #2.
>
> But, @expose(expose=False) just feels ugly.  Hence, perhaps @view _is_ a
> better name, even though I was originally in the @expose camp before I
> started trying to use alternate dispatching.

If this is true I think a better solution would be to split existing
expose() decorator into two: the first will call the second (say,
view()) and then set exposed attribute. This way you can call either
expose() or view() depending on whether you need that exposed flag.

Max.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to