yourlabs / django-cities-light

A simple app providing three models: Country, Region and City model. Also provided, a command to insert or update data from geonames database dumps. Status: stable.
http://django-cities-light.rtfd.org/
MIT License
335 stars 126 forks source link

Alternative to geodata data pre loading: on the fly loading with geobytes #10

Closed jpic closed 12 years ago

jpic commented 12 years ago

We might as well include an autocomplete which uses geobytes free api:

http://www.geobytes.com/free-ajax-cities-jsonp-api.htm

Rather than, pre-loading a database with insane amounts of cities/countries.

skeet70 commented 12 years ago

I actually kind of prefer pre loading. When initially looking at this problem I thought of writing my own with geobytes, but to me the end user experience is better with indexed db tables than with calls to an external API.

If we needed to do extremely complex things (like django-cites enables) then it may be better to let their servers handle the processing and just give us the data, but as the app stands right now it seems more efficient to have these tables.

jpic commented 12 years ago

Actually Geobytes won't allow to make the autocomplete we want so it's out of the question for now...

... however I need support for the autocomplete to use an API, but we're going to keep the current pattern (using contrib, one project with restframework urls, another with remote autocomplete).

Thanks for your feedback !