Ok, refactored meta stuff to widgets.meta. I had to add a compound  
attr to Widgets so meta can know when a field is compound without  
circular imports.

On 10/03/2006, at 19:40, Michele Cella wrote:
>
> #XXX: Shall compunds display errors or let their inner widgets, dislay
> them?
>
> No, Compounds are responsible for the layout, Compounds should manage
> error displaying. See #125.

That was not exactly the question I wanted to make, sorry. What I  
meant is that unpacked_error dicts have a key for compound widgets  
too when they have an error. I think it contains a list of all errors  
for all inner widgets, this is just how FE works. I noticed this on  
the browser test so cannot say for sure what format it's in (has  
__str__ for sure :) You can try to reproduce it by commenting those  
two lines beneath the comment (sic). Right now they are ignored.

>
> I think that without ignore_key_missing = True disabled_fields will  
> not
> work right, am I wrong? this wil also fix #659 I guess... not sure.

Mmmm, I'm not sure but I think they will not :( However, I think we  
can add it back safely as ignoring missing keys shouldn't be as  
dangerous as accepting spurious keys. Anyway, I think that maybe we  
shouldn't add because you can always override that behavior by  
passing a custom schema to forms which you expect to disable some  
fields.

What I'd really like to fix when this get's in (I have a sort of  
cumbersome poor-man's svn with this patch numbering stuff :) Is the  
allow_extra_fields = True (setting it to false) and possibly adding a  
filter_extra_fields=True too. Needs some more testing though as some  
tests where failing when I tried it (probably because some input- 
expecting widget's didn't have a validator) but didn't look into it  
too closely... There's a post in this thread where I explain better  
the reasoning behind this...

My goal here is too make the default Schema @ validators as strict as  
possible (secure by default) but with the possibility of loosening it  
up by subclassing.

Well, I'm ready to commit :) , comments on validation9.patch @ #613?

Regards,

Alberto


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk
-~----------~----~----~----~------~----~------~--~---

Reply via email to