Our app uses a number of state integers mapped to names inside a
dictionary. The state stored in the model is an integer and we use the
dictionary to pull out the names whenever we want to.
We have a custom template filter to get the names from the template
context. e.g.
{{ message.state|stateName }}
We cannot, however, seem to get this working inside condition
statements in a template e.g.
{% ifequal message.state|stateName "Sent" %}
Is this a known limitation? I'd rather use this in my templates than
some magic number associated with the state.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---