> First, you could see 'choices' parameter in CharField or IntegerField, > and django has a handly function get_FOO_display() to get the > corresponding string value of a special key, just like what you want. > In db_api document, searcin get_FOO_display you'll get the answer.
This is handy to know. We do in fact use the choices parameter for this field. > Second, yeah there is limit for ifequal, you can not using filter to > template var. There is not a good sulotion I think, except you can use > CatchTag written by me.http://www.djangosnippets.org/snippets/10/ > > For example: > > {% catch as state %}{{ message.state|stateName }}{% endcatch %} > {% ifequal state "Sent" %} Aha! I should have known that a filter does not change the variable itself, so the condition statement won't work in this case. The CatchTag custom tag looks excellent. Cheers, Ben --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

