Le 12/07/2011 14:34, Alessandro Molina a écrit :
As widgets are singleton they are created once at the application
startup, so if you pass the result of a query to the OneOf it will
contain only the results that were on the database at startup time.

If you are passing an SQLAlchemy query to the validator you should be
able to inherit a version of the validator for which self.list is a
property that sets self._list and returns self._list.all() leaving all
the other code as it is.
  • Does this mean that every time the form result is checked a new singleton will be created?
  • Does this mean that passing as parameter a list-like class with an iterable all() method is enough for the validator to be dynamic?
Damien

--
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?hl=en.

Reply via email to