On Sun, Jan 4, 2009 at 3:57 AM, Tycon <[email protected]> wrote:
> Using this decorator has greatly simplified my form handling code, so
> if there is interest I can publish the source code for this decorator/
> handler architecture.

Yes, please publish it and put a link in ticket #405
http://pylonshq.com/project/pylonshq/ticket/405

There has been a proposal to split @validate into three parts that can
be used independently in an action, while still keeping the decorator
compatible.  Then Mike Bayer proposed a second solution which uses
Mako (and may be too much Mako code for a Pylons default?).  But we
are still looking for other approaches.  I use @validate but am not
that happy with it.  I'm not sure that a validator is even the right
solution to this problem, because you can't pass action-specific state
through a decorator and that's often the most interesting state (the
database record corresponding to the request).  One problem with
@validate currently is that it mixes code that's part of the basic
pattern with code to make the decorator flexible, and that makes it
cumbersome to inline "the equivalent code" in an action.

-- 
Mike Orr <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to