<div class="gmail_quote">On Wed, May 23, 2012 at 2:18 PM, Marcin Tustin <span dir="ltr">&lt;<a href="mailto:marcin.tustin@gmail.com" target="_blank">marcin.tustin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;m wrapping an object to pass to a django form, to alter how it is displayed in the form. Django&#39;s form rendering code has the code:<div>if callable(data):</div><div>    data = data()<br><br>This breaks when passed the proxy object, because the underlying object is not callable.</div>
</blockquote><div><br>Ah.  In that case, define a __call__ on your wrapper class that returns self.  ;-)<br></div></div><br>