X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/ac6ebd8b38a46afb0b249574be71a276f95b6efa..46997a51ed0ceb16ddbac712fbcb552a86cdc9e2:/philo/templatetags/include_string.py diff --git a/philo/templatetags/include_string.py b/philo/templatetags/include_string.py index 1de9ded..ecf9b45 100644 --- a/philo/templatetags/include_string.py +++ b/philo/templatetags/include_string.py @@ -1,3 +1,17 @@ +""" +.. templatetag:: include_string + +include_string +-------------- + +Include a flat string by interpreting it as a template. The compiled template will be rendered with the current context. + +Usage:: + + {% include_string %} + +""" + from django import template from django.conf import settings @@ -6,8 +20,6 @@ register = template.Library() class IncludeStringNode(template.Node): - """The passed variable is expected to be a string of template code to be rendered with - the current context.""" def __init__(self, string): self.string = string @@ -24,14 +36,6 @@ class IncludeStringNode(template.Node): def do_include_string(parser, token): - """ - Include a flat string by interpreting it as a template. - - Usage:: - - {% include_string %} - - """ bits = token.split_contents() if len(bits) != 2: raise TemplateSyntaxError("%r tag takes one argument: the template string to be included" % bits[0])