summaryrefslogtreecommitdiff
path: root/django/contrib/gis
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-12-14 10:17:18 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-12-28 17:02:29 +0100
commitfdbfc98003f0ba2d3a12def63a75560791f3602d (patch)
tree0238fba169970595f1a8c44d53550fada6236b4f /django/contrib/gis
parenta0141f9eac03f0fef722e757253bbc939c018f77 (diff)
downloaddjango-fdbfc98003f0ba2d3a12def63a75560791f3602d.tar.gz
Deprecated some arguments of django.shortcuts.render(_to_response).
dictionary and context_instance and superseded by context. Refactored tests that relied context_instance with more modern idioms.
Diffstat (limited to 'django/contrib/gis')
-rw-r--r--django/contrib/gis/admin/widgets.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/gis/admin/widgets.py b/django/contrib/gis/admin/widgets.py
index 716327cf0a..c85e7a6125 100644
--- a/django/contrib/gis/admin/widgets.py
+++ b/django/contrib/gis/admin/widgets.py
@@ -1,7 +1,7 @@
import logging
from django.forms.widgets import Textarea
-from django.template import loader, Context
+from django.template import loader
from django.utils import six
from django.utils import translation
@@ -10,7 +10,7 @@ from django.contrib.gis.geos import GEOSGeometry, GEOSException
# Creating a template context that contains Django settings
# values needed by admin map templates.
-geo_context = Context({'LANGUAGE_BIDI': translation.get_language_bidi()})
+geo_context = {'LANGUAGE_BIDI': translation.get_language_bidi()}
logger = logging.getLogger('django.contrib.gis')
@@ -81,8 +81,8 @@ class OpenLayersWidget(Textarea):
# geometry.
self.params['wkt'] = wkt
- return loader.render_to_string(self.template, self.params,
- context_instance=geo_context)
+ self.params.update(geo_context)
+ return loader.render_to_string(self.template, self.params)
def map_options(self):
"Builds the map options hash for the OpenLayers template."