-
Notifications
You must be signed in to change notification settings - Fork 287
Open
Description
I've successfully installed django-leaflet into my app and can view/edit my polygon fields from the admin panel. I've been able to view but not edit the polygons in a normal django form.
My model:
class Location(models.Model):
class Meta:
db_table = "location"
ordering = ['name']
id = models.UUIDField(db_column="location_id", primary_key=True, default=uuid.uuid4, editable=False)
name = models.CharField(db_column="location_name", null=False, max_length=750)
drawn_area = models.PolygonField(db_column="location_drawn_area", null=False, srid=4326)
My form:
class LocationForm(forms.ModelForm):
class Meta:
model = Location
fields = ['name', 'drawn_area']
labels = {
'name': 'Location Name',
'drawn_area': 'Drawn Area'
}
widgets = {
'drawn_area': LeafletWidget()
}
When I click the edit layers button, I end up with:
I'm not sure what I'm doing wrong, or it's a bug, or something in between.
Metadata
Metadata
Assignees
Labels
No labels