coderholic / django-cities

Countries and cities of the world for Django projects
MIT License
923 stars 371 forks source link

Query Question #197

Open sowinski opened 6 years ago

sowinski commented 6 years ago

Hi,

habe a problem to build a query. I think this kind of query should also be described in the example section of the read me file.

I want all cities starting with an "A" in Poland for example. This is how I do it right now: country = Country.objects.filter(tld='pl).first() City.objects.filter(name__istartswith="a", country=country) This works fine. But how do I get for example all Ukraine cities with their names in Russian language starting with the Russian letter: Г country = Country.objects.filter(tld='ua).first() City.objects.filter(name__istartswith="Г", country=country) This is not working, I need to tell the query somehow to change the language to Russian. How can I do this?