X-Git-Url: https://git.mdrn.pl/django-ssify.git/blobdiff_plain/af10b85180a1c533b43091d65ab724977a6d2e74..9c5fe2012a14bf1c840e304b1bd1d9f72fffba6a:/ssify/variables.py diff --git a/ssify/variables.py b/ssify/variables.py index 46a787b..014e95f 100644 --- a/ssify/variables.py +++ b/ssify/variables.py @@ -11,7 +11,8 @@ at request time to the prerendered templates. """ from __future__ import unicode_literals from hashlib import md5 -from django import template +from django.template import Node +from django.template.base import get_library from django.utils.encoding import force_text, python_2_unicode_compatible from django.utils.functional import Promise from django.utils.safestring import mark_safe @@ -72,7 +73,7 @@ class SsiVariable(object): def get_value(self, request): """Computes the real value of the variable, using the request.""" taglib, tagname = self.tagpath.rsplit('.', 1) - return template.get_library(taglib).tags[tagname].get_value( + return get_library(taglib).tags[tagname].get_value( request, *self.args, **self.kwargs) def __str__(self): @@ -117,7 +118,7 @@ def ssi_expect(var, type_): return type_(var) -class SsiVariableNode(template.Node): +class SsiVariableNode(Node): """ Node for the SsiVariable tags. """ def __init__(self, tagpath, args, kwargs, patch_response=None, asvar=None): self.tagpath = tagpath