diff options
author | Tim Graham <timograham@gmail.com> | 2016-12-23 12:46:01 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-12-23 15:06:03 -0500 |
commit | 1a96b54ef6effe902732644ead6e8be55ec8bca4 (patch) | |
tree | 2c9e96704044d3140fa0e88d52270ef89e9976c3 /django/contrib/gis/forms/widgets.py | |
parent | edb961329d73b81e6a2e3795439141d30076271b (diff) | |
download | django-15667.tar.gz |
Updated GIS widgets15667
Diffstat (limited to 'django/contrib/gis/forms/widgets.py')
-rw-r--r-- | django/contrib/gis/forms/widgets.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/contrib/gis/forms/widgets.py b/django/contrib/gis/forms/widgets.py index c1995266bb..37e58d9b74 100644 --- a/django/contrib/gis/forms/widgets.py +++ b/django/contrib/gis/forms/widgets.py @@ -6,7 +6,6 @@ from django.conf import settings from django.contrib.gis import gdal from django.contrib.gis.geos import GEOSException, GEOSGeometry from django.forms.widgets import Widget -from django.template import loader from django.utils import six, translation logger = logging.getLogger('django.contrib.gis') @@ -43,7 +42,7 @@ class BaseGeometryWidget(Widget): logger.error("Error creating geometry from value '%s' (%s)", value, err) return None - def render(self, name, value, attrs=None, renderer=None): + def get_context(self, name, value, attrs=None): # 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): @@ -74,7 +73,7 @@ class BaseGeometryWidget(Widget): LANGUAGE_BIDI=translation.get_language_bidi(), **attrs )) - return loader.render_to_string(self.template_name, context) + return context class OpenLayersWidget(BaseGeometryWidget): |