Thank you, this was the most beautiful solution.
I post it here, in case if someone will search it:
class Msg(models.Model):
......
......
......
status = models.IntegerField(choices=MSG_STATUS_LIST)
def getStatus(self):
return MSG_STATUS_LIST[self.road_status][1]
in template:
{{m.getStatus}}
On Oct 9, 11:50 am, Javier Guerra <[email protected]> wrote:
> Bogdan I. Bursuc wrote:
> > You may consider
> > creating a tag or a filter for this job.
>
> or a function on the model class
>
> --
> Javier
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---