Closed debuggerpk closed 7 years ago
Is the example lookup what you're currently doing? What would you like to be able to do?
The problem is, default name for my country is wrong, for example Multan
is stated as Multān
, it is not spelled like that. The same is the case for all the citites in my country.
So to get the right name, i had to formulate the above query.
The second apporach for me is to right a migration script to update each row for my country, and run it every time the cities data gets updated.
//ysf
The name without the diacritic is available as name_std:
>>> city = City.objects.filter(country__name='Pakistan').get(name_std='Multan')
>>> city
<City: Multān>
>>> city.name
u'Mult\u0101n'
It sounds like you're saying the diacritic is incorrect and doesn't belong there though. The official page seems to confirm that: http://www.multan.gov.pk/. You should report this back to our source data provider http://www.geonames.org
oh .. thanks .. and will report
i have posted this at forums for correction, lets see where this leads to.
You should be able to modify the GeoNames data directly after creating an account and logging in.
Furthermore, importing a subset of the names is something that could be done with a plugin. Please see the documentation on writing plugins and the example plugins for how to create your own.
And if you think the plugin would be helpful for other people, please consider creating a PR for it.
Thanks! Closing.
is there a way that we can use specify the city names langauge during import?
because for me, this query is certainly harder
instead of doing a name lookup. The reason i had to it this way because, the fault name for Multan in the geonames database is Multān, which is wrong.
//ysf