Widgets

class osm_field.widgets.OSMWidget(lat_field, lon_field, data_field=None, attrs=None)

Bases: django.forms.widgets.TextInput

Adds a OpenStreetMap Leaflet dropdown map to the front-end once the user focuses the form field. See the usage chapter on how to integrate the CSS and JavaScript code.

property media
render(name, value, attrs=None, renderer=None)

Render the widget as an HTML string.

render_osmfield(id_)