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
-
Add "geolocation_fields" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ #... 'geolocation_fields', ]
-
Add a PointField to a model:
from geolocation_fields.models import fields field_name = fields.PointField(verbose_name='field_name')
-
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
- With the input field displayed
- Without input field
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-geolocation-fields-0.1.5.post0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7f0c458b8fd1189202b056ef61382322eaa3d1b402f981204290dda9086d7ea |
|
MD5 | 5586820a77c89ab4d5f04390d3e7e9c9 |
|
BLAKE2b-256 | 905cf2f5c4c94392ae36209be3520eddbb0ecc119e520f56f4e1f48f8acde57f |
Hashes for django_geolocation_fields-0.1.5.post0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0cf7a5465b33b17d4d7c97906255a93e2f68aa9bc6f77e70a847975dfb3425d |
|
MD5 | 4b8ee2b8fa283787da107f2c38f8e215 |
|
BLAKE2b-256 | ee4de7f76666fdfebcc18c4bd0607033b23ff6b8e7efa6b927dd89b375377964 |