Skip to main content

Django app to add GEO data [Countries, Cities, Time Zones, Geo Points and their Polygons in geoJSON format.]

Project description

django-geodata

Django app to add GEO data [Countries, Cities, Time Zones, Geo Points and their Polygons in geoJSON format.]

Install

  1. Download Django app packege: pip require django-geodata

  1. Add to your django settings.py file database connection settings for geodata table:

     DATABASE_ROUTERS = ['geodata.databaserouter.GeodataRouter']
     DATABASE_APPS_MAPPING = {'geodata': 'geodata'}
     DATABASES = {
         'geodata': {
         'ENGINE': 'django.contrib.gis.db.backends.postgis',
         'NAME': 'geodata',
         'USER': 'postgres',
         'PASSWORD': 'Postgres911!',
         'HOST': 'localhost',
         'PORT': '5432'
     }
    

  1. In settings.py register geodata in Django Apps list:

     INSTALLED_APPS = [
     	'geodata'
     ]
    

  1. Add to your django urls.py:

    urlpatterns = [
        path('api/', include('geodata.urls')),
    ]
    

  1. Seed geo data for example Russia (contry code = RU) data or use US, GB, FR, DE or other valid country code python manage.py seedcountry RU

  1. python manage.py runserver

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-geodata, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django_geodata-0.1.1-py3-none-any.whl (2.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size django-geodata-0.1.1.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page