Skip to main content
https://travis-ci.org/kingsdigitallab/django-geonames-place.svg?branch=master https://codecov.io/gh/kingsdigitallab/django-geonames-place/branch/master/graph/badge.svg

Application to access Geonames Places directly from Django. The application can create places by using a geonames id or by using a search address.

This application depends on the very useful Python Geocoder library.

Documentation

The full documentation is at https://django-geonames-place.readthedocs.io.

Quickstart

Install Django Geonames Place:

pip install django-geonames-place

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'geonames_place.apps.GeonamesPlaceConfig',
    ...
)

Add the settings GEONAMES_KEY and GEONAMES_MAX_RESULTS. The GEONAMES_KEY is your Geoname API key, and the GEONAMES_MAX_RESULTS is used to set the maximum number of results when searching Geonames.

GEONAMES_KEY = '<GEONAMES_USERNAME>'
GEONAMES_MAX_RESULTS = 10

To reference Geonames Place in your models:

from django.db import models
from geonames_place.models import Place


class MyModel(models.Model):
    ...
    place = models.ForeignKey(Place, on_delete=models.CASCADE)
    ...

Running Tests

Does the code actually work?

export GEONAMES_KEY=<GEONAMES_USERNAME>
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.6.0 (2020-03-30)

  • Added SelectMultiple autocomplete widget.

0.5.0 (2020-03-27)

  • Added autocomplete widget and view to use app outside of Django admin.

0.1.0 (2018-11-13)

  • First release on PyPI.

Download files

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

Source Distribution

django-geonames-place-0.7.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_geonames_place-0.7.0-py2.py3-none-any.whl (12.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-geonames-place-0.7.0.tar.gz.

File metadata

  • Download URL: django-geonames-place-0.7.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.7

File hashes

Hashes for django-geonames-place-0.7.0.tar.gz
Algorithm Hash digest
SHA256 e19b54a2b4a09d613fbff6491b06d48e9a63485b15e2ae5c14dd0bb211d5aa82
MD5 c1c179d36205a126f4654e5909945adc
BLAKE2b-256 cf1256943d8bd7e82edbca2b4327d1409ebe32a3e478ad7b7f846f70971977b6

See more details on using hashes here.

File details

Details for the file django_geonames_place-0.7.0-py2.py3-none-any.whl.

File metadata

  • Download URL: django_geonames_place-0.7.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.7

File hashes

Hashes for django_geonames_place-0.7.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a7117584a2f187314e486e6293104caaf716e5c7262c5016eb1dd689bec1dd7a
MD5 400afb1b1120d3da7faecd56ba047cac
BLAKE2b-256 6ffe9fff3f0a75f4ce4748fd22126adb3d4509c62752d1f0eb4a4ba9af6c8c67

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 files

0.6.0

2 files

0.5.0

2 files

0.4.6

2 files

0.4.5

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

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