In my model I have a field:
country = models.CharField(_('Country'), max_length=2, choices=COUNTRIES)
Where COUNTRIES is a tuple of tuples like this:
COUNTRIES = (
('AF', _('Afghanistan')),
... and so on
Now I want to filter an instance of that model, by the country name.
This:
i = MyModel.objects.filter(country__iexact=query)
only lets me filter by the country code.
How can I filter by country name?