Robin Haswell wrote:
> Michele Cella wrote:
> > Ok, patch in svn and 1.0 branch, new package here:
> >
> > http://trac.turbogears.org/turbogears/attachment/wiki/SimpleWidgetForm/WeAreFlexible-0.9a5.tar.gz?format=raw
>
> Cheers, I read through this package and it looks pretty good to me :-) I'll 
> give it a try as soon a
> .9a5 is released and will let you know what I think.
>
> -Rob

Great to know!

Actually the features I've used are there since the first alpha release
of 0.9 (before there was just field_for but in 0.9a3 IIRC I enchained
it to be display/render_field_for since we added new features that
required more control and people were using it in the wrong way),
anyway the first I've made the first version at 4AM so I missed that
you can already do the same thing even on 0.9a4 it's just 7 lines of
code to add, I've updated the package:

http://trac.turbogears.org/turbogears/attachment/wiki/SimpleWidgetForm/WeAreFlexible.tar.gz

You can *already* use it if you want to, no need to wait for 0.9a5,
when the latter is out you can safely remove these things from
controllers.py:

from cherrypy import request (if you don't use it for other things)
from turbogears.widgets.forms import retrieve_value_by_path

and from StandardTextField:

    def update_data(self, d):
        super(StandardTextField, self).update_data(d)
        errors = getattr(request, "validation_errors", {})
        d["error"] = retrieve_value_by_path(errors, self.name_path)
        d["label"] = self.label

since in 0.9a5 they will be there by default:

http://trac.turbogears.org/turbogears/changeset/1208

Thanks.

Ciao
Michele


--~--~---------~--~----~------------~-------~--~----~
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