diff --git a/django/contrib/gis/forms/widgets.py b/django/contrib/gis/forms/widgets.py index e9518f4e7e..cc82f41563 100644 --- a/django/contrib/gis/forms/widgets.py +++ b/django/contrib/gis/forms/widgets.py @@ -43,6 +43,7 @@ class BaseGeometryWidget(Widget): return None def get_context(self, name, value, attrs): + context = super(BaseGeometryWidget, self).get_context(name, value, attrs) # If a string reaches here (via a validation error on another # field) then just reconstruct the Geometry. if value and isinstance(value, six.string_types): @@ -64,7 +65,7 @@ class BaseGeometryWidget(Widget): if attrs is None: attrs = {} - context = self.build_attrs(self.attrs, dict( + context.update(self.build_attrs(self.attrs, dict( name=name, module='geodjango_%s' % name.replace('-', '_'), # JS-safe serialized=self.serialize(value), @@ -72,7 +73,7 @@ class BaseGeometryWidget(Widget): STATIC_URL=settings.STATIC_URL, LANGUAGE_BIDI=translation.get_language_bidi(), **attrs - )) + ))) return context diff --git a/docs/releases/1.11.1.txt b/docs/releases/1.11.1.txt index 53c43443aa..1f475ee736 100644 --- a/docs/releases/1.11.1.txt +++ b/docs/releases/1.11.1.txt @@ -40,3 +40,5 @@ Bugfixes * Restored the output of the ``class`` attribute in the ``