[Django]-How to get key from model_utils triple Choices?

3👍

the solution is:

In [11]: {v: k for k, v in CHOICES._identifier_map.items()}
Out[11]: {1: 'somekey'}
👤Danil

Leave a comment