I have the following tuple list: It is for choice fields in a django model.
ENTITY_TYPE_CHOICES = (
(0,'choice1'),
(1,'choice2'),
)
I want to get the choices by their string name like:
entity_type_index = ENTITY_TYPE_CHOICES['choice1']
I get the error:
tuple indices must be integers, not str