This sounds like a noob question, I just want to ask how do I get the string value of this tuple.
USER_TYPE_CHOICES = (
(1, 'PQA'),
(2, 'Tester'),
(3, 'Test Lead'),
(4, 'Test manager'),
(5, 'Senior Test Manager'),
(6, 'admin'),
)
user_type = models.PositiveSmallIntegerField(choices=USER_TYPE_CHOICES)
When I call the value as:
<h1> {{ user.user_type }} </h1>
It shows up as the int value and not the string.
It sounds very simple but I can't seem to find it on the python documentation.