Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restricting import? #200

Open
timmyomahony opened this issue Jun 28, 2018 · 2 comments
Open

Restricting import? #200

timmyomahony opened this issue Jun 28, 2018 · 2 comments

Comments

@timmyomahony
Copy link

timmyomahony commented Jun 28, 2018

I'm confused by the import configuration settings and general workflow.

  • Can I supply the files to be imported into the DB myself (by downloading manually and placing in the correct data folder), in other words can I skip the "download" stage of the import command
  • Can I restrict what countries, cities etc. are imported? For example, I only want US cities to be imported.

Thanks

@fffffrolov
Copy link

I'm confused by the import configuration settings and general workflow.

  • Can I supply the files to be imported into the DB myself (by downloading manually and placing in the correct data folder), in other words can I skip the "download" stage of the import command
  • Can I restrict what countries, cities etc. are imported? For example, I only want US cities to be imported.

Thanks

I don't know about 1 point. About 2:
https://github.com/coderholic/django-cities#download-files
You can see whole list here:
http://download.geonames.org/export/dump/

CITIES_FILES = {
     'city': {
        'filenames': ["US.zip"],
        'urls':      ['http://download.geonames.org/export/dump/'+'{filename}']
    },
}

@ddahan
Copy link

ddahan commented Aug 17, 2022

What about the regions / postal codes? There is no way to filter for these models

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants