"Michele Cella" <[EMAIL PROTECTED]> writes:

> 1) ATM in controllers.py for the validate decorator we are checking
> that we received a Widget instance to do the validation on a form:
>
>         from turbogears.widgets import Widget
>
>         if callable(form) and not isinstance(form, Widget):
>             init_form = lambda self: form(self)
>
> I would like to remove this evil isinstance and replace it with
> something that checks the presence of a callable validate method, this
> will let other home-grown widget system to take advantage of the
> validate decorator and AFAIK we are already doing the same for
> retrieve_css and retrieve_javascript.

+1

> 2) In ticket #531:
>
> http://trac.turbogears.org/turbogears/ticket/531
>
> we committed a patch that adds support for SQLObject functionality to
> the SelectionField,  as I said on the ticket this is not something we
> should support IMHO since the selection field is just meant to work by
> providing a list of (id, description) tuples without assumption of
> specific hacks to support SQLObject, is there a use case for this that
> I'm missing (for example FastData) or just a wrong use? should we
> remove it?

Yes, we should remove it and keep things as independent of SQLObject as
possible.  Otherwise, prepare yourself for making the same implementation for
SQL Alchemy, then ORM XYZ and then ... :-)


-- 
Jorge Godoy      <[EMAIL PROTECTED]>

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