+class Include(ObjectBase):
+ def __init__(self, tpl, visibility=None, weight=500):
+ super(Include, self).__init__(visibility, weight)
+ self.template = template.loader.get_template(tpl)
+
+ def render(self, context):
+ if not isinstance(context, template.Context):
+ context = template.Context(context)
+ return self.template.render(context)
+