On 1/9/07, Chris Brand <[EMAIL PROTECTED]> wrote:
> Presumably I can also use that in a template :
> {% object.get_kind_display %}
Yup.
--
"May the forces of evil become confused on the way to your house."
-- George Carlin
--~--~-~--~~~---~--~~
You received
> Each instance of your model will have a special method name
> 'get_foo_display', where 'foo' is the name of the field with the
> choices. For example:
I should have found that. Thanks.
> >>> b.get_kind_display()
Presumably I can also use that in a template :
{% object.get_kind_display %}
On 1/9/07, Chris Brand <[EMAIL PROTECTED]> wrote:
> In the admin, it displays the current value nicely (the second column), but
> on my page, it displays the actual value from the database (the first
> column) instead. I'd like to display the value used by the admin form, but
> can't figure where
3 matches
Mail list logo