Hi Sean,
Nothing like a proposal that includes a patch :)
I do agree that the monolithic, growing expose is not ideal, and I do
want to make it possible (and easy!) to use other decorators, because
they can be quite useful.
Just to confirm my hunch (without actually looking at your patch :):
@turbogears.expose(html="my.template")
def save(self, name, address):
...do something...
return dict(foo="bar")
This will still work just as before.
So the main bit that your patch does is break out any input related
behavior and expose parameters into a new decorator. It's not really
any more verbose, it's just moving them to a new home. Seems like a
good idea on the surface.
Kevin
On 11/12/05, Sean Cazzell <[EMAIL PROTECTED]> wrote:
>
> I have opened a ticket for this and submitted a patch (diff of
> controllers.py only) that splits expose into expose and unpack. Perhaps
> unpack should be called something else (validate)?
>
> http://trac.turbogears.org/turbogears/ticket/113
>
>
>
> Sean
>
>
--
Kevin Dangoor
Author of the Zesty News RSS newsreader
email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com