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.post0.tar.gz (846.3 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.post0-py3-none-any.whl (700.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-geolocation-fields-0.1.5.post0.tar.gz
  • Upload date:
  • Size: 846.3 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.post0.tar.gz
Algorithm Hash digest
SHA256 f7f0c458b8fd1189202b056ef61382322eaa3d1b402f981204290dda9086d7ea
MD5 5586820a77c89ab4d5f04390d3e7e9c9
BLAKE2b-256 905cf2f5c4c94392ae36209be3520eddbb0ecc119e520f56f4e1f48f8acde57f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_geolocation_fields-0.1.5.post0-py3-none-any.whl
  • Upload date:
  • Size: 700.2 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.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0cf7a5465b33b17d4d7c97906255a93e2f68aa9bc6f77e70a847975dfb3425d
MD5 4b8ee2b8fa283787da107f2c38f8e215
BLAKE2b-256 ee4de7f76666fdfebcc18c4bd0607033b23ff6b8e7efa6b927dd89b375377964

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