I am not so sure why everyone seems to be so unhappy with FormEncode. I find it a rather brilliant solution. There is definitely a steeper than average learning curve but like all things that are powerful and can be adapted to any situation, there is always a tradeoff. I would hate to see support for FormEncode lost in Pylons. I currently use @validate with custom validators and formatters with htmlfill with great success. I think it would be a great loss to move to some simpler solution that is not as powerful. The reason I chose Pylons is for its power to adapt, otherwise, I would have gone with Django - less learning curve but less adaptable. If there is going to be support added for an alternative form processing framework on top of FormEncode then that is great but I would hate to see FormEncode dropped. I know that I could always continue using FormEncode because Pylons is flexible but maintaining @validate on my own is not the ultimate situation.
Cheers 2009/10/4 DavidG <[email protected]> > > Does either Django forms or WTForms support chained validators a la > FormEncode? I find this a very useful feature. > > Both solutions look really nice - I wonder what the advantages/ > disadvantages to using WTForms are, compared to FormEncode/htmlfill? I > never had much luck with @validate, so handling the details of form > logic has always been a bear with the current patterns. > > David > > On Oct 3, 5:50 am, Dan <[email protected]> wrote: > > There seems to be a basic set of validators for integers, email, > > dates, etc. However writing custom validators is very simple (compared > > to FormEncode) and it should be easy to "fill in the gaps" with > > additional validators, which could be added to the Pylons core or > > submitted to WTForms. > > > > On Oct 3, 5:23 am, Mike Orr <[email protected]> wrote: > > > > > On Fri, Oct 2, 2009 at 4:05 PM, Dan <[email protected]> wrote: > > > > > > WTForms does this already:http://wtforms.simplecodes.com/ > > > > > > It uses the same pattern as Django forms, and might be a bit further > > > > developed. > > > > > That looks pretty elegant. It would obviate FormEncode, htmlfill, and > > > the form helpers, it looks like. Are the validators complete? Not > > > that FormEncode's validators are easy to use in their semi-documented > > > state. > > > > > Can you use the validators alone without the form? I use a FormEncode > > > schema to validate the INI file in environment.py, so that I can make > > > all exceptions happen at the beginning rather than in unexpected > > > requests. > > > > > If you can make a Pylons tutorial for it, we can consider documenting > > > it in the next version of Pylons. > > > > > -- > > > Mike Orr <[email protected]> > > > > > > > -- Never take life seriously. Nobody gets out alive anyway. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
