diff options
| author | Chris Beaven <smileychris@gmail.com> | 2011-08-27 04:55:02 +0000 |
|---|---|---|
| committer | Chris Beaven <smileychris@gmail.com> | 2011-08-27 04:55:02 +0000 |
| commit | f85b96121aa267dade4391b3eeb0ffbf64b32f12 (patch) | |
| tree | 7c9af0f6510c79b8269f09f9b1b8fc6a09e96b2e | |
| parent | 4c8f2dca215299bcba1a1b7547452f3a3944576e (diff) | |
Fix a small thread safety issue in ExtendsNode. No tests, but Malcolm said that's ok, honest.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/template/loader_tags.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py index 8f951edee9..b642765341 100644 --- a/django/template/loader_tags.py +++ b/django/template/loader_tags.py @@ -88,8 +88,9 @@ class ExtendsNode(Node): def get_parent(self, context): if self.parent_name_expr: - self.parent_name = self.parent_name_expr.resolve(context) - parent = self.parent_name + parent = self.parent_name_expr.resolve(context) + else: + parent = self.parent_name if not parent: error_msg = "Invalid template name in 'extends' tag: %r." % parent if self.parent_name_expr: |
