Let users pick locations using a map widget and store its latitude and longitude.
Documentation: https://django-location-field.readthedocs.io/en/latest/
License: MIT
Tests are performed with Python 2 and 3, Django 1.11 and 2, and SpatiaLite.
Install through pip (or manually place it on your PYTHONPATH
).
pip install django-location-field
Add location_field.apps.DefaultConfig
to INSTALLED_APPS
your settings.py file
For example, PostGIS:
https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/postgis/
Basic usage (using Spatial Database)
from django.contrib.gis.db import models from django.contrib.gis.geos import Point from location_field.models.spatial import LocationField class Place(models.Model): city = models.CharField(max_length=255) location = LocationField(based_fields=['city'], zoom=7, default=Point(1.0, 1.0))Basic usage (without Spatial Database)
from django.db import models from location_field.models.plain import PlainLocationField class Place(models.Model): city = models.CharField(max_length=255) location = PlainLocationField(based_fields=['city'], zoom=7)
Nick Frost has credit over the image used as logo for this project. CC BY
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4