Moved templatetag docs into the respective modules and fleshed them out. Centralized...
[philo.git] / philo / templatetags / include_string.py
index 1de9ded..ecf9b45 100644 (file)
@@ -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 <template_code> %}
+
+"""
+
 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 <template_code> %}
-       
-       """
        bits = token.split_contents()
        if len(bits) != 2:
                raise TemplateSyntaxError("%r tag takes one argument: the template string to be included" % bits[0])