Ticket #23441: 0001-Prevent-maximumrecursiondepthexceededintemplates.patch

File 0001-Prevent-maximumrecursiondepthexceededintemplates.patch, 1.1 KB (added by Venelin Stoykov, 10 years ago)

Prevent maximum recursion depth exceeded in templates

  • django/template/base.py

    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):  
    12101210            params, varargs, varkw, defaults = getargspec(func)
    12111211
    12121212            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 = ()
    12131217
    12141218                def render(self, context):
    12151219                    resolved_args, resolved_kwargs = self.get_resolved_arguments(context)
Back to Top