Closed ericel closed 1 year ago
My admin site draws the polygon just fine and fills in the colors as seen here:
Unfortunately, this is not true for a custom template. I get this:
Here is my form and template setup:
{% leaflet_css plugins="forms" %} {% leaflet_js plugins="forms" %} {% endblock %} <form method="post"> {% csrf_token %} {{ marketzoneform.as_p }} <button type="submit">Add Market Zone</button> </form>``` ### Form class is as below: ```class MarketZoneForm(forms.ModelForm): class Meta: model = MarketZone fields = ['name', 'description', 'geom'] widgets = {'geom': LeafletWidget(attrs={'geom_type': "GEOMETRYCOLLECTION", 'display_raw': 'true'})}
settings.py:
INSTALLED_APPS = [ ... 'leaflet', ] ```
It was a SVG display problem
My admin site draws the polygon just fine and fills in the colors as seen here:
Unfortunately, this is not true for a custom template. I get this:
Here is my form and template setup:
settings.py: