summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-04-21 04:44:30 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-04-21 04:44:30 +0000
commit2a512a4e83499b38fa04aa20f742afe95dbd7c3a (patch)
tree0c173ddc6a4f3f1fa18ea0661032ec9ee914b314 /django
parent43cd7bb110bb7d012f37fe93767168e99821d86d (diff)
Fixed #3749 -- Set the context correctly when using the "filter" template tag.
Thanks, Zak Johnson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/template/defaulttags.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index ef57aa2449..d997d20077 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -41,7 +41,10 @@ class FilterNode(Node):
def render(self, context):
output = self.nodelist.render(context)
# apply filters
- return self.filter_expr.resolve(Context({'var': output}))
+ context.update({'var': output})
+ filtered = self.filter_expr.resolve(context)
+ context.pop()
+ return filtered
class FirstOfNode(Node):
def __init__(self, vars):