[PEAK] ObjectWrapper subclasses always callable
pje at telecommunity.com
Wed May 23 15:32:12 EDT 2012
On Wed, May 23, 2012 at 2:18 PM, Marcin Tustin <marcin.tustin at gmail.com>wrote:
> I'm wrapping an object to pass to a django form, to alter how it is
> displayed in the form. Django's form rendering code has the code:
> if callable(data):
> data = data()
> This breaks when passed the proxy object, because the underlying object is
> not callable.
Ah. In that case, define a __call__ on your wrapper class that returns
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PEAK