Skip to content

Commit 3960bcd

Browse files
committed
Allow to override store and field at widget level
1 parent 4dc6ac0 commit 3960bcd

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
@@ -50,6 +50,6 @@ def render(self, name, value, attrs=None):
5050
attrs.update(id_map=map_id + '_map',
5151
id_map_callback=map_id + '_map_callback',
5252
modifiable=self.modifiable,
53-
geometry_field_class=attrs.get('geometry_field_class', 'L.GeometryField'),
54-
field_store_class=attrs.get('field_store_class', 'L.FieldStore'))
53+
geometry_field_class=attrs.get('geometry_field_class', getattr(self, 'geometry_field_class', 'L.GeometryField')),
54+
field_store_class=attrs.get('field_store_class', getattr(self, 'field_store_class', 'L.FieldStore')))
5555
return super(LeafletWidget, self).render(name, value, attrs)

0 commit comments

Comments
 (0)