On Sat, Nov 12, 2005 at 12:54:35PM -0500, Sean Cazzell wrote:
> 
> I would like to propose that we break up the @expose decorator into two
> or more separate decorators.  The current implementation of @expose has
> a lot of functionality in it which makes it almost impossible to use
> other decorators on your controller methods without breaking things.
> 
> (The reason is @expose must be the first decorator on your method so it
> can use inspect.getargspec on the controller method.  And since @expose
> does the dict->template/json translation, other decorators do not get a
> chance to alter the dict before template/json processing.)
> 
> We can split the expose decorator into two parts - input processing and
> output processing.  Currently, input processing includes validators and
> inputform - if we put these into their own decorator(s), then it would
> allow additional decorators to get in the middle and do useful things.
> 
> 
> @expose(template="myproject.templates.foo")
> @unpack(... validators and inputform stuff here ...)
> def foo(bar):
>     ...
> 
> or maybe even:
> 
> @expose(template="myproject.templates.foo")
> @validators( ... validator stuff ... )
> @form( ... form stuff ... )
> def foo(bar):
>     ...
> 
> My personal preference would be the latter - decorators should do only
> one thing.  I would be happy to submit a patch with the necessary
> changes once consensus is reached on how to divide expose up.
> 
> 
> 
> Sean Cazzell

Just trying to rekindle this thread.

How far along is it?  What was decided?  If nothing has been decided yet,
what is the prevailing opinion?  Who has the patches?  What can I do to
help? ;)

Jason

-- 
If you understand, things are just as they are.  If you do not understand,
things are just as they are.

Attachment: pgpdIj18r6duh.pgp
Description: PGP signature

Reply via email to