Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 516 Bytes

integrating-with-geodjango.md

File metadata and controls

16 lines (11 loc) · 516 Bytes

Integrating with GeoDjango

First make sure you have GeoDjango correctly setup and a PointField field defined in your model, then add a GeoPanel among your content_panels.

from django.contrib.gis.db import models
from wagtailleafletwidget.edit_handlers import GeoPanel


class MyPage(Page):
    location = models.PointField(srid=4326, null=True, blank=True)

    content_panels = Page.content_panels + [
        GeoPanel('location'),
    ]