Google Maps widget for the GeoDjango PointField field in Wagtail
Project description
A Google Maps widget for the GeoDjango PointField field in Wagtail.
Requirements
Python 2.7 / Python 3.5
Wagtail 1.7+ and Django (with GeoDjango)
Installation
Install the library with pip:
$ pip install wagtailgeowidget
Quick Setup
Make sure wagtail_geo_widget is added to your INSTALLED_APPS.
INSTALLED_APPS = (
# ...
'wagtailgeowidget',
)
This should be enough to get started.
Usage
First make sure you have a location field defined in your model, then add a GeoPanel among your content_panels.
from wagtailgeowidget.edit_handlers import GeoPanel
class MyPage(Page):
address = models.CharField(max_length=250, blank=True, null=True)
location = models.PointField(srid=4326, null=True, blank=True)
content_panels = Page.content_panels + [
GeoPanel('location', address_field='address'),
]
Settings
GOOGLE_MAPS_V3_APIKEY: Api key for google maps
Contributing
Want to contribute? Awesome. Just send a pull request.
License
Wagtail-Geo-Widget is released under the MIT License.
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
wagtailgeowidget-1.0.1.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for wagtailgeowidget-1.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9b7b78bcb773288ba0b73f3f1c764d8e10e9e7f0db61a108343a4bd670e41a3 |
|
MD5 | 190eb4f8a05b0eb22d7c006c7a29e2e6 |
|
BLAKE2b-256 | bed83445ae51a06d3f553db02773fe75a08b38865f60baee43781cea4a3a5baa |