1๐
โ
I believe you can do following:
china_code = list(filter(lambda x: x[1] == 'China', RegulationModel.Market.choices)).pop()[1]
regulation = RegulationModel.objects.get(market=china_code)
But it is a bit hacky. I recommend using django-useful and its implementation of Choices.
๐คpe.kne
Source:stackexchange.com