summaryrefslogtreecommitdiff
path: root/django/contrib/gis/admin/widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/gis/admin/widgets.py')
-rw-r--r--django/contrib/gis/admin/widgets.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/contrib/gis/admin/widgets.py b/django/contrib/gis/admin/widgets.py
index dc556ba964..014b3ad818 100644
--- a/django/contrib/gis/admin/widgets.py
+++ b/django/contrib/gis/admin/widgets.py
@@ -3,7 +3,6 @@ import logging
from django.contrib.gis.gdal import GDALException
from django.contrib.gis.geos import GEOSException, GEOSGeometry
from django.forms.widgets import Textarea
-from django.template import loader
from django.utils import six, translation
# Creating a template context that contains Django settings
@@ -16,7 +15,7 @@ class OpenLayersWidget(Textarea):
"""
Renders an OpenLayers map using the WKT of the geometry.
"""
- def render(self, name, value, attrs=None, renderer=None):
+ def get_context(self, name, value, attrs=None):
# Update the template parameters with any attributes passed in.
if attrs:
self.params.update(attrs)
@@ -77,7 +76,7 @@ class OpenLayersWidget(Textarea):
self.params['wkt'] = wkt
self.params.update(geo_context)
- return loader.render_to_string(self.template, self.params)
+ return self.params
def map_options(self):
"Builds the map options hash for the OpenLayers template."