Skip to main content

A Django app to work with geolocation fields without a spatial database.

Project description

django-geolocation-fields

A Django app to facilitate the manipulation of Geolocation objects in a GeoDjango app without using a spatial database.

Detailed documentation is in the "docs" directory.

Quick start

The project is still in development

Here is an example that uses it https://github.com/syk1k/django-geolocation

  1. Add "geolocation_fields" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        #...
        'geolocation_fields',
    ]
    
  2. Add a PointField to a model:

    from geolocation_fields.models import fields
    field_name = fields.PointField(verbose_name='field_name')
    
  3. Configurations To have more control over the package, you can canfigure it yourself

    By default the PointField's widget only display the map, you can also chose to display the editable input field in the settings

    GEOLOCATION_FIELD = {
        'display_input': True, # Display the input field. False to remove
    }
    

    This version of the package integrate leaflet only. Here is the default configuration for the fields (PointField for the moment). The configurations uses leaflet Map options. Check the leafletJS Check doc here

    GEOLOCATION_FIELD = {
        "provider": "leaflet", # Two provider: Leaflet, Mapbox
        "center" : [0,0],
        "zoom": 12,
        'display_input': False,
    }
    

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-geolocation-fields-0.1.4.tar.gz (686.6 kB view details)

Uploaded Source

Built Distribution

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

django_geolocation_fields-0.1.4-py3-none-any.whl (699.4 kB view details)

Uploaded Python 3

File details

Details for the file django-geolocation-fields-0.1.4.tar.gz.

File metadata

  • Download URL: django-geolocation-fields-0.1.4.tar.gz
  • Upload date:
  • Size: 686.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for django-geolocation-fields-0.1.4.tar.gz
Algorithm Hash digest
SHA256 141ed7b29597e638316f216704f5cc3ff319dc9cf6b617040e6387dda1b1b92e
MD5 9a8e28ffc6c28a1e8398bf54e976c75a
BLAKE2b-256 bfd0e9b983e71ef7d447c1001dcc78f37650d027d8cef01b9eeeb825b53114d0

See more details on using hashes here.

File details

Details for the file django_geolocation_fields-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: django_geolocation_fields-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 699.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for django_geolocation_fields-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 761bd06b8e6baaa5e8ee82e31a13b595453e7b66914c6a4c528f9e2216c16808
MD5 079eea79fc11a7c999cfbd0c7116dc0f
BLAKE2b-256 f8d5dc5a54cd90d9f14ffba7d0c803589deca5a6afa1308228ffc5ae26d381d0

See more details on using hashes here.

Supported by

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