summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-07-01 09:32:26 -0400
committerTim Graham <timograham@gmail.com>2014-07-01 17:29:41 -0400
commit20ec9daf7c2a4460e99a2983d7e32b7db5ee7ce6 (patch)
tree9e0cfa72e3987e87b1bc8ed34271a117147a0f6d /django
parent232f2028d57bb3b55304d3ea80ab0a06122f0b34 (diff)
Fixed #22933 -- Deprecated django.template.resolve_variable().
Diffstat (limited to 'django')
-rw-r--r--django/template/base.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/template/base.py b/django/template/base.py
index e829604418..5615478ea5 100644
--- a/django/template/base.py
+++ b/django/template/base.py
@@ -4,11 +4,13 @@ import re
from functools import partial
from importlib import import_module
from inspect import getargspec, getcallargs
+import warnings
from django.apps import apps
from django.conf import settings
from django.template.context import (BaseContext, Context, RequestContext, # NOQA: imported for backwards compatibility
ContextPopException)
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.itercompat import is_iterable
from django.utils.text import (smart_split, unescape_string_literal,
get_text_list)
@@ -658,6 +660,9 @@ def resolve_variable(path, context):
Deprecated; use the Variable class instead.
"""
+ warnings.warn("resolve_variable() is deprecated. Use django.template."
+ "Variable(path).resolve(context) instead",
+ RemovedInDjango20Warning, stacklevel=2)
return Variable(path).resolve(context)