From b61bcd60d9c12da8757107752f1ddd6a1025ae44 Mon Sep 17 00:00:00 2001
From: Venelin Stoykov <vkstoykov@gmail.com>
Date: Sat, 6 Sep 2014 20:27:18 +0300
Subject: [PATCH] Prevent maximum recursion depth exceeded in templates
This can happen when `django.template.loaders.cached.Loader` is used
and we have recursion logic in templates.
---
django/template/base.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/django/template/base.py b/django/template/base.py
index b608367..81f053a 100644
a
|
b
|
class Library(object):
|
1210 | 1210 | params, varargs, varkw, defaults = getargspec(func) |
1211 | 1211 | |
1212 | 1212 | class InclusionNode(TagHelperNode): |
| 1213 | # Prevent maximum recursion depth exceeded when |
| 1214 | # `django.template.loaders.cached.Loader` is used and |
| 1215 | # we have recursion logic in templates. |
| 1216 | child_nodelists = () |
1213 | 1217 | |
1214 | 1218 | def render(self, context): |
1215 | 1219 | resolved_args, resolved_kwargs = self.get_resolved_arguments(context) |