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,
    }
    

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.post1.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.post1-py3-none-any.whl (700.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-geolocation-fields-0.1.5.post1.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.post1.tar.gz
Algorithm Hash digest
SHA256 c979602527a299176425af21ea4e818c27a72c20ffbe99c0e999893706b1546d
MD5 f701d1295a9daee0032e6c35584b6fd4
BLAKE2b-256 91f8e4b368d280954b8aed73547051d7e2f8cb9f662278e5de790e36a9712388

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_geolocation_fields-0.1.5.post1-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.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 af5640afb4fa95390f082974bbcc5dc8452cd544dce321bd17b351f6e1b05e9b
MD5 c7af68c6bc68e81d27a77ab9b3b16591
BLAKE2b-256 313fa313f7ecccb61d78a4bd845f0016915d74829891e6875507913c633c5b72

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