Ticket #6506: django-layer-context-in-include-tag.patch

File django-layer-context-in-include-tag.patch, 857 bytes (added by Kenneth Arnold, 17 years ago)
  • template/__init__.py

     
    885885                        else:
    886886                            t = get_template(file_name)
    887887                        self.nodelist = t.nodelist
    888                     return self.nodelist.render(context_class(dict,
    889                             autoescape=context.autoescape))
     888                    new_context = context_class(context, autoescape=context.autoescape)
     889                    new_context.update(dict)
     890                    return self.nodelist.render(new_context)
    890891
    891892            compile_func = curry(generic_tag_compiler, params, defaults, getattr(func, "_decorated_function", func).__name__, InclusionNode)
    892893            compile_func.__doc__ = func.__doc__
Back to Top