Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

EasyIncNode added for handling inclusion tags

  • Loading branch information...
commit e50a502277441d421521a9d71eefd184ad245d12 1 parent b135ad2
@drtyrsa authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/easytags/
12 src/easytags/
@@ -8,7 +8,8 @@
from inspect import getargspec
-from django.template import Node, Variable, TemplateSyntaxError
+from django.template import Node, Variable, TemplateSyntaxError, Context
+from django.template.loader import render_to_string
is_kwarg = lambda bit: not bit[0] in (u'"', u"'") and u'=' in bit
@@ -128,3 +129,12 @@ def render(self, context):
context[self.varname] = rendered
return u''
return rendered
+class EasyIncNode(EasyNode):
+ def render(self, context):
+ if not self.takes_context:
+ context = Context({})
+ rendered = super(EasyIncNode, self).render(context)
+ context.update(rendered)
+ print render_to_string(self.template_name, context)
+ return render_to_string(self.template_name, context)

0 comments on commit e50a502

Please sign in to comment.
Something went wrong with that request. Please try again.