Skip to content

Commit e016787

Browse files
authored
Solve broken marker image paths in the admin panel (#392)
* Solve broken marker image paths in the admin panel #382 * Remove semicolon
1 parent f62e92c commit e016787

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

leaflet/forms/widgets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from django.template.defaultfilters import slugify
77
from django.templatetags.static import static
88

9-
from leaflet import app_settings, PLUGINS, PLUGIN_FORMS
9+
from leaflet import PLUGIN_FORMS, PLUGINS, app_settings
1010

1111

1212
class LeafletWidget(BaseGeometryWidget):
@@ -94,6 +94,6 @@ def get_context(self, name, value, attrs):
9494
context = super().get_context(name, value, attrs)
9595
context.update(self.get_attrs(name, attrs))
9696
context["csp_nonce"] = self.csp_nonce
97-
context["FORCE_IMAGE_PATH"] = app_settings.get('FORCE_IMAGE_PATH')
97+
context["FORCE_IMAGE_PATH"] = static("leaflet/images/") if app_settings['FORCE_IMAGE_PATH'] else False
9898
context["reset_view_icon"] = static("leaflet/images/reset-view.png")
9999
return context

0 commit comments

Comments
 (0)