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 doc here

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

Screenshots

  1. With the input field displayed

with_input

  1. Without input field

without_input

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.5.tar.gz (843.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_geolocation_fields-0.1.5-py3-none-any.whl (700.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-geolocation-fields-0.1.5.tar.gz
  • Upload date:
  • Size: 843.1 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.5.tar.gz
Algorithm Hash digest
SHA256 7b1617f892c93ce9e8c44ce7a4b639f023b4a171b7f2ea9c90d6524a518a748b
MD5 5da61a6017a1de52e02145f8d39f770f
BLAKE2b-256 9d4c7859c42d7bd7b6eed070353187ef4a14aec87c58d1af79affbe5069bd038

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_geolocation_fields-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 700.1 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c808895fa5706bad3b918c834e3b73cc395b22f581e946b241df90809762ac81
MD5 1f65ee1bc953dd3e4b1535e0ba31270c
BLAKE2b-256 03b695ac1f6cd3ce3e83c1bb259190fd99f69bfcb77999244d9e863402569ffd

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