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
- Download Django app packege:
pip require django-geodata
-
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' }
-
In
settings.py
register geodata in Django Apps list:INSTALLED_APPS = [ 'geodata' ]
-
Add to your django
urls.py
:urlpatterns = [ path('api/', include('geodata.urls')), ]
- 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
python manage.py runserver
Project details
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for django_geodata-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff9873268d489c048d368fe763777ad67073279d273c62e8514f7898fe7f61c1 |
|
MD5 | bfcae3a620d6b6c3a437330c57460f32 |
|
BLAKE2b-256 | f0768ddd793b67e400b7fe800b382bf6a03b82678dd92bcd52c658c9c7a12e59 |