gis.widgets.BaseGeometryWidget.template_name

BaseGeometryWidget.template_name

The template used to render the map widget.

You can pass widget attributes in the same manner that for any other Django widget. For example:

from django.contrib.gis import forms

class MyGeoForm(forms.Form):
    point = forms.PointField(widget=
        forms.OSMWidget(attrs={'map_width': 800, 'map_height': 500}))
doc_Django
2016-10-09 18:38:37
Comments
Leave a Comment

Please login to continue.