Skip to content

Commit

Permalink
Remove forms dependency on 'extras' (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz authored Oct 14, 2024
1 parent 08422bb commit 8efe275
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion leaflet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 5 additions & 1 deletion leaflet/forms/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down

0 comments on commit 8efe275

Please sign in to comment.