Refs #22933 -- Removed template.resolve_variable() per deprecation timeline.

This commit is contained in:
Tim Graham 2015-08-18 10:30:11 -04:00
parent 222d063301
commit 5c62887d82
2 changed files with 0 additions and 18 deletions

View File

@ -61,9 +61,6 @@ from .base import ( # NOQA i
Context, Node, NodeList, Origin, RequestContext, Template, Variable, Context, Node, NodeList, Origin, RequestContext, Template, Variable,
) )
# Deprecated in Django 1.8, will be removed in Django 1.10.
from .base import resolve_variable # NOQA isort:skip
# Library management # Library management
from .library import Library # NOQA isort:skip from .library import Library # NOQA isort:skip

View File

@ -54,13 +54,11 @@ from __future__ import unicode_literals
import inspect import inspect
import logging import logging
import re import re
import warnings
from django.template.context import ( # NOQA: imported for backwards compatibility from django.template.context import ( # NOQA: imported for backwards compatibility
BaseContext, Context, ContextPopException, RequestContext, BaseContext, Context, ContextPopException, RequestContext,
) )
from django.utils import six from django.utils import six
from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import ( from django.utils.encoding import (
force_str, force_text, python_2_unicode_compatible, force_str, force_text, python_2_unicode_compatible,
) )
@ -747,19 +745,6 @@ class FilterExpression(object):
return self.token return self.token
def resolve_variable(path, context):
"""
Returns the resolved variable, which may contain attribute syntax, within
the given context.
Deprecated; use the Variable class instead.
"""
warnings.warn("resolve_variable() is deprecated. Use django.template."
"Variable(path).resolve(context) instead",
RemovedInDjango110Warning, stacklevel=2)
return Variable(path).resolve(context)
class Variable(object): class Variable(object):
""" """
A template variable, resolvable against a given context. The variable may A template variable, resolvable against a given context. The variable may