[stringtemplate-interest] ST, Django and get_something_display()
Roman Odaisky
roma at qwertty.com
Thu Jul 31 06:49:43 PDT 2008
Greetings,
In Django, if I define a field “foo” and set its “choices” attribute, the
framework automatically adds a get_foo_display() method to the model class.
How do I refer to it in ST? $obj.foo_display$ looks for obj.getFoo_display()
and fails, $obj.get_foo_display$ finds the method but stringizes the method
instead of calling it (I get something like “<bound method obj._curried of
<obj: some object>>”).
What’s the proper way of doing it apart from hacking StringTemplate code?
--
TIA
Roman.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2286 bytes
Desc: not available
Url : http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20080731/573ee9e5/attachment.bin
More information about the stringtemplate-interest
mailing list