X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/826f365e26c0de1d2c16e8365235ccce921e3641..6a9c8723936694a6b55f8b4bdcac7009c6c3cccf:/templatetags/containers.py diff --git a/templatetags/containers.py b/templatetags/containers.py index 25156f2..ca5e1e9 100644 --- a/templatetags/containers.py +++ b/templatetags/containers.py @@ -25,7 +25,7 @@ class ContainerNode(template.Node): self.nodelist_empty = template.NodeList() else: self.nodelist_empty = nodelist_empty - + def render(self, context): content = settings.TEMPLATE_STRING_IF_INVALID if 'page' in context: @@ -78,6 +78,7 @@ class ContainerNode(template.Node): content = '' return content + def do_container(parser, token): """ {% container [[references ] as ] %} @@ -125,5 +126,7 @@ def do_container(parser, token): else: # error raise template.TemplateSyntaxError('"%s" template tag provided without arguments (at least one required)' % tag) + + register.tag('container', do_container) register.tag('blockcontainer', do_container)