diff --git a/leaflet/__init__.py b/leaflet/__init__.py index d1f2f303..08c34516 100644 --- a/leaflet/__init__.py +++ b/leaflet/__init__.py @@ -91,7 +91,6 @@ # Add plugins required for forms (not auto-included) # Assets will be preprended to any existing entry in PLUGINS['forms'] _forms_js = ['leaflet/draw/leaflet.draw.js', - 'leaflet/leaflet.extras.js', 'leaflet/leaflet.forms.js'] if SRID: _forms_js += ['leaflet/proj4.js', diff --git a/leaflet/forms/widgets.py b/leaflet/forms/widgets.py index 06801432..e84c312b 100644 --- a/leaflet/forms/widgets.py +++ b/leaflet/forms/widgets.py @@ -25,7 +25,11 @@ def media(self): # We assume that including media for widget means there is # no Leaflet at all in the page. - js = ['leaflet/leaflet.js'] + PLUGINS[PLUGIN_FORMS]['js'] + js = [ + 'leaflet/leaflet.js', + 'leaflet/leaflet.extras.js', + *PLUGINS[PLUGIN_FORMS]['js'], + ] css = ['leaflet/leaflet.css'] + PLUGINS[PLUGIN_FORMS]['css'] return forms.Media(js=js, css={'screen': css})