You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'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:
My form:
When I click the edit layers button, I end up with:
https://imgur.com/a/VmKRhrq
I'm not sure what I'm doing wrong, or it's a bug, or something in between.
The text was updated successfully, but these errors were encountered: