new_context = paginate(context)
if self.template:
template_list.insert(0, self.template)
- return loader.render_to_string(template_list, new_context,
- context_instance = context)
-
+ with context.push(new_context):
+ return loader.render_to_string(template_list, context)
def do_paginate(parser, token):