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.

Source Distribution

django-geodata-0.1.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

django_geodata-0.1.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file django-geodata-0.1.1.tar.gz.

File metadata

  • Download URL: django-geodata-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for django-geodata-0.1.1.tar.gz
Algorithm Hash digest
SHA256 326050ce68e9ab79f9660789d29e876133c5c862dbd60c52684ce468cd515468
MD5 e4b68d4aefb6e12e2ccb5184b89a5c9f
BLAKE2b-256 83842c9356dda32c22fcab3f352a28a4f2b76d4a5fb68d30773044a858d90f5f

See more details on using hashes here.

File details

Details for the file django_geodata-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: django_geodata-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for django_geodata-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff9873268d489c048d368fe763777ad67073279d273c62e8514f7898fe7f61c1
MD5 bfcae3a620d6b6c3a437330c57460f32
BLAKE2b-256 f0768ddd793b67e400b7fe800b382bf6a03b82678dd92bcd52c658c9c7a12e59

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page